

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="Description" content="scikit-learn: machine learning in Python">

  
  <title>Version 0.20.4 &mdash; scikit-learn 0.22 documentation</title>
  
  <link rel="canonical" href="http://scikit-learn.org/stable/whats_new/v0.20.html" />

  
  <link rel="shortcut icon" href="../_static/favicon.ico"/>
  

  <link rel="stylesheet" href="../_static/css/vendor/bootstrap.min.css" type="text/css" />
  <link rel="stylesheet" href="../_static/gallery.css" type="text/css" />
  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script> 
</head>
<body>
<nav id="navbar" class="sk-docs-navbar navbar navbar-expand-md navbar-light bg-light py-0">
  <div class="container-fluid sk-docs-container px-0">
      <a class="navbar-brand py-0" href="../index.html">
        <img
          class="sk-brand-img"
          src="../_static/scikit-learn-logo-small.png"
          alt="logo"/>
      </a>
    <button
      id="sk-navbar-toggler"
      class="navbar-toggler"
      type="button"
      data-toggle="collapse"
      data-target="#navbarSupportedContent"
      aria-controls="navbarSupportedContent"
      aria-expanded="false"
      aria-label="Toggle navigation"
    >
      <span class="navbar-toggler-icon"></span>
    </button>

    <div class="sk-navbar-collapse collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav mr-auto">
        <li class="nav-item">
          <a class="sk-nav-link nav-link" href="../install.html">Install</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link" href="../user_guide.html">User Guide</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link" href="../modules/classes.html">API</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link" href="../auto_examples/index.html">Examples</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../getting_started.html">Getting Started</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../tutorial/index.html">Tutorial</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../glossary.html">Glossary</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../developers/index.html">Development</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../faq.html">FAQ</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../related_projects.html">Related packages</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../roadmap.html">Roadmap</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../about.html">About us</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="https://github.com/scikit-learn/scikit-learn">GitHub</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="https://scikit-learn.org/dev/versions.html">Other Versions</a>
        </li>
        <li class="nav-item dropdown nav-more-item-dropdown">
          <a class="sk-nav-link nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">More</a>
          <div class="dropdown-menu" aria-labelledby="navbarDropdown">
              <a class="sk-nav-dropdown-item dropdown-item" href="../getting_started.html">Getting Started</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../tutorial/index.html">Tutorial</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../glossary.html">Glossary</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../developers/index.html">Development</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../faq.html">FAQ</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../related_projects.html">Related packages</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../roadmap.html">Roadmap</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../about.html">About us</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="https://github.com/scikit-learn/scikit-learn">GitHub</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="https://scikit-learn.org/dev/versions.html">Other Versions</a>
          </div>
        </li>
      </ul>
      <div id="searchbox" role="search">
          <div class="searchformwrapper">
          <form class="search" action="../search.html" method="get">
            <input class="sk-search-text-input" type="text" name="q" aria-labelledby="searchlabel" />
            <input class="sk-search-text-btn" type="submit" value="Go" />
          </form>
          </div>
      </div>
    </div>
  </div>
</nav>
<div class="d-flex" id="sk-doc-wrapper">
    <input type="checkbox" name="sk-toggle-checkbox" id="sk-toggle-checkbox">
    <label id="sk-sidemenu-toggle" class="sk-btn-toggle-toc btn sk-btn-primary" for="sk-toggle-checkbox">Toggle Menu</label>
    <div id="sk-sidebar-wrapper" class="border-right">
      <div class="sk-sidebar-toc-wrapper">
        <div class="sk-sidebar-toc-logo">
          <a href="../index.html">
            <img
              class="sk-brand-img"
              src="../_static/scikit-learn-logo-small.png"
              alt="logo"/>
          </a>
        </div>
        <div class="btn-group w-100 mb-2" role="group" aria-label="rellinks">
            <a href="v0.21.html" role="button" class="btn sk-btn-rellink py-1" sk-rellink-tooltip="Version 0.21.3">Prev</a><a href="../whats_new.html" role="button" class="btn sk-btn-rellink py-1" sk-rellink-tooltip="Release History">Up</a>
            <a href="v0.19.html" role="button" class="btn sk-btn-rellink py-1" sk-rellink-tooltip="Version 0.19.2">Next</a>
        </div>
        <div class="alert alert-danger p-1 mb-2" role="alert">
          <p class="text-center mb-0">
          <strong>scikit-learn 0.22</strong><br/>
          <a href="http://scikit-learn.org/dev/versions.html">Other versions</a>
          </p>
        </div>
        <div class="alert alert-warning p-1 mb-2" role="alert">
          <p class="text-center mb-0">
            Please <a class="font-weight-bold" href="../about.html#citing-scikit-learn"><string>cite us</string></a> if you use the software.
          </p>
        </div>
          <div class="sk-sidebar-toc">
            <ul>
<li><a class="reference internal" href="#">Version 0.20.4</a><ul>
<li><a class="reference internal" href="#changelog">Changelog</a><ul>
<li><a class="reference internal" href="#sklearn-cluster"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.cluster</span></code></a></li>
<li><a class="reference internal" href="#sklearn-compose"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.compose</span></code></a></li>
<li><a class="reference internal" href="#sklearn-decomposition"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.decomposition</span></code></a></li>
<li><a class="reference internal" href="#sklearn-model-selection"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.model_selection</span></code></a></li>
<li><a class="reference internal" href="#sklearn-neighbors"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.neighbors</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#version-0-20-3">Version 0.20.3</a><ul>
<li><a class="reference internal" href="#id1">Changelog</a><ul>
<li><a class="reference internal" href="#id2"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.cluster</span></code></a></li>
<li><a class="reference internal" href="#id3"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.compose</span></code></a></li>
<li><a class="reference internal" href="#sklearn-covariance"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.covariance</span></code></a></li>
<li><a class="reference internal" href="#id4"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.decomposition</span></code></a></li>
<li><a class="reference internal" href="#sklearn-datasets"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.datasets</span></code></a></li>
<li><a class="reference internal" href="#sklearn-feature-extraction"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.feature_extraction</span></code></a></li>
<li><a class="reference internal" href="#sklearn-impute"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.impute</span></code></a></li>
<li><a class="reference internal" href="#sklearn-linear-model"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.linear_model</span></code></a></li>
<li><a class="reference internal" href="#sklearn-preprocessing"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.preprocessing</span></code></a></li>
<li><a class="reference internal" href="#sklearn-svm"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.svm</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#code-and-documentation-contributors">Code and Documentation Contributors</a></li>
</ul>
</li>
<li><a class="reference internal" href="#version-0-20-2">Version 0.20.2</a><ul>
<li><a class="reference internal" href="#changed-models">Changed models</a></li>
<li><a class="reference internal" href="#id5">Changelog</a><ul>
<li><a class="reference internal" href="#id6"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.compose</span></code></a></li>
<li><a class="reference internal" href="#sklearn-metrics"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.metrics</span></code></a></li>
<li><a class="reference internal" href="#id7"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.neighbors</span></code></a></li>
<li><a class="reference internal" href="#sklearn-utils"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.utils</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#id8">Code and Documentation Contributors</a></li>
</ul>
</li>
<li><a class="reference internal" href="#version-0-20-1">Version 0.20.1</a><ul>
<li><a class="reference internal" href="#id9">Changed models</a></li>
<li><a class="reference internal" href="#id10">Changelog</a><ul>
<li><a class="reference internal" href="#id11"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.cluster</span></code></a></li>
<li><a class="reference internal" href="#id12"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.compose</span></code></a></li>
<li><a class="reference internal" href="#id13"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.datasets</span></code></a></li>
<li><a class="reference internal" href="#id14"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.decomposition</span></code></a></li>
<li><a class="reference internal" href="#sklearn-ensemble"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.ensemble</span></code></a></li>
<li><a class="reference internal" href="#id15"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.feature_extraction</span></code></a></li>
<li><a class="reference internal" href="#id16"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.linear_model</span></code></a></li>
<li><a class="reference internal" href="#id17"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.metrics</span></code></a></li>
<li><a class="reference internal" href="#sklearn-mixture"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.mixture</span></code></a></li>
<li><a class="reference internal" href="#id18"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.neighbors</span></code></a></li>
<li><a class="reference internal" href="#id19"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.preprocessing</span></code></a></li>
<li><a class="reference internal" href="#id20"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.utils</span></code></a></li>
<li><a class="reference internal" href="#miscellaneous">Miscellaneous</a></li>
</ul>
</li>
<li><a class="reference internal" href="#id21">Code and Documentation Contributors</a></li>
</ul>
</li>
<li><a class="reference internal" href="#version-0-20-0">Version 0.20.0</a><ul>
<li><a class="reference internal" href="#highlights">Highlights</a></li>
<li><a class="reference internal" href="#id22">Changed models</a></li>
<li><a class="reference internal" href="#known-major-bugs">Known Major Bugs</a></li>
<li><a class="reference internal" href="#id23">Changelog</a><ul>
<li><a class="reference internal" href="#id24"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.cluster</span></code></a></li>
<li><a class="reference internal" href="#id25"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.compose</span></code></a></li>
<li><a class="reference internal" href="#id26"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.covariance</span></code></a></li>
<li><a class="reference internal" href="#id27"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.datasets</span></code></a></li>
<li><a class="reference internal" href="#id28"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.decomposition</span></code></a></li>
<li><a class="reference internal" href="#sklearn-discriminant-analysis"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.discriminant_analysis</span></code></a></li>
<li><a class="reference internal" href="#sklearn-dummy"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.dummy</span></code></a></li>
<li><a class="reference internal" href="#id29"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.ensemble</span></code></a></li>
<li><a class="reference internal" href="#id30"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.feature_extraction</span></code></a></li>
<li><a class="reference internal" href="#sklearn-feature-selection"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.feature_selection</span></code></a></li>
<li><a class="reference internal" href="#sklearn-gaussian-process"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.gaussian_process</span></code></a></li>
<li><a class="reference internal" href="#id31"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.impute</span></code></a></li>
<li><a class="reference internal" href="#sklearn-isotonic"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.isotonic</span></code></a></li>
<li><a class="reference internal" href="#id32"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.linear_model</span></code></a></li>
<li><a class="reference internal" href="#sklearn-manifold"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.manifold</span></code></a></li>
<li><a class="reference internal" href="#id33"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.metrics</span></code></a></li>
<li><a class="reference internal" href="#id34"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.mixture</span></code></a></li>
<li><a class="reference internal" href="#id35"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.model_selection</span></code></a></li>
<li><a class="reference internal" href="#sklearn-multioutput"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.multioutput</span></code></a></li>
<li><a class="reference internal" href="#sklearn-naive-bayes"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.naive_bayes</span></code></a></li>
<li><a class="reference internal" href="#id36"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.neighbors</span></code></a></li>
<li><a class="reference internal" href="#sklearn-neural-network"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.neural_network</span></code></a></li>
<li><a class="reference internal" href="#sklearn-pipeline"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.pipeline</span></code></a></li>
<li><a class="reference internal" href="#id37"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.preprocessing</span></code></a></li>
<li><a class="reference internal" href="#id38"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.svm</span></code></a></li>
<li><a class="reference internal" href="#sklearn-tree"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.tree</span></code></a></li>
<li><a class="reference internal" href="#id39"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.utils</span></code></a></li>
<li><a class="reference internal" href="#multiple-modules">Multiple modules</a></li>
<li><a class="reference internal" href="#id40">Miscellaneous</a></li>
</ul>
</li>
<li><a class="reference internal" href="#changes-to-estimator-checks">Changes to estimator checks</a></li>
<li><a class="reference internal" href="#id41">Code and Documentation Contributors</a></li>
</ul>
</li>
</ul>

          </div>
      </div>
    </div>
    <div id="sk-page-content-wrapper">
      <div class="sk-page-content container-fluid body px-md-3" role="main">
        
  <div class="section" id="version-0-20-4">
<span id="changes-0-20-4"></span><h1>Version 0.20.4<a class="headerlink" href="#version-0-20-4" title="Permalink to this headline">¶</a></h1>
<p><strong>July 30, 2019</strong></p>
<p>This is a bug-fix release with some bug fixes applied to version 0.20.3.</p>
<div class="section" id="changelog">
<h2>Changelog<a class="headerlink" href="#changelog" title="Permalink to this headline">¶</a></h2>
<p>The bundled version of joblib was upgraded from 0.13.0 to 0.13.2.</p>
<div class="section" id="sklearn-cluster">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.cluster" title="sklearn.cluster"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.cluster</span></code></a><a class="headerlink" href="#sklearn-cluster" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.cluster.KMeans.html#sklearn.cluster.KMeans" title="sklearn.cluster.KMeans"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.KMeans</span></code></a> where KMeans++ initialisation
could rarely result in an IndexError. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11756">#11756</a> by <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-compose">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.compose" title="sklearn.compose"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.compose</span></code></a><a class="headerlink" href="#sklearn-compose" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed an issue in <a class="reference internal" href="../modules/generated/sklearn.compose.ColumnTransformer.html#sklearn.compose.ColumnTransformer" title="sklearn.compose.ColumnTransformer"><code class="xref py py-class docutils literal notranslate"><span class="pre">compose.ColumnTransformer</span></code></a> where using
DataFrames whose column order differs between :func:<code class="docutils literal notranslate"><span class="pre">fit</span></code> and
:func:<code class="docutils literal notranslate"><span class="pre">transform</span></code> could lead to silently passing incorrect columns to the
<code class="docutils literal notranslate"><span class="pre">remainder</span></code> transformer.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/14237">#14237</a> by <code class="docutils literal notranslate"><span class="pre">Andreas</span> <span class="pre">Schuderer</span> <span class="pre">&lt;schuderer&gt;</span></code>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-decomposition">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.decomposition" title="sklearn.decomposition"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.decomposition</span></code></a><a class="headerlink" href="#sklearn-decomposition" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.cross_decomposition.CCA.html#sklearn.cross_decomposition.CCA" title="sklearn.cross_decomposition.CCA"><code class="xref py py-class docutils literal notranslate"><span class="pre">cross_decomposition.CCA</span></code></a> improving numerical
stability when <code class="docutils literal notranslate"><span class="pre">Y</span></code> is close to zero. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13903">#13903</a> by <a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-model-selection">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.model_selection" title="sklearn.model_selection"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.model_selection</span></code></a><a class="headerlink" href="#sklearn-model-selection" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug where <a class="reference internal" href="../modules/generated/sklearn.model_selection.StratifiedKFold.html#sklearn.model_selection.StratifiedKFold" title="sklearn.model_selection.StratifiedKFold"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.StratifiedKFold</span></code></a>
shuffles each class’s samples with the same <code class="docutils literal notranslate"><span class="pre">random_state</span></code>,
making <code class="docutils literal notranslate"><span class="pre">shuffle=True</span></code> ineffective.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/13124">#13124</a> by <a class="reference external" href="https://github.com/qinhanmin2014">Hanmin Qin</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-neighbors">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.neighbors" title="sklearn.neighbors"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.neighbors</span></code></a><a class="headerlink" href="#sklearn-neighbors" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.neighbors.KernelDensity.html#sklearn.neighbors.KernelDensity" title="sklearn.neighbors.KernelDensity"><code class="xref py py-class docutils literal notranslate"><span class="pre">neighbors.KernelDensity</span></code></a> which could not be
restored from a pickle if <code class="docutils literal notranslate"><span class="pre">sample_weight</span></code> had been used.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/13772">#13772</a> by <a class="reference external" href="https://github.com/aditya1702">Aditya Vyas</a>.</p></li>
</ul>
<blockquote>
<div></div></blockquote>
</div>
</div>
</div>
<div class="section" id="version-0-20-3">
<span id="changes-0-20-3"></span><h1>Version 0.20.3<a class="headerlink" href="#version-0-20-3" title="Permalink to this headline">¶</a></h1>
<p><strong>March 1, 2019</strong></p>
<p>This is a bug-fix release with some minor documentation improvements and
enhancements to features released in 0.20.0.</p>
<div class="section" id="id1">
<h2>Changelog<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id2">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.cluster" title="sklearn.cluster"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.cluster</span></code></a><a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.cluster.KMeans.html#sklearn.cluster.KMeans" title="sklearn.cluster.KMeans"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.KMeans</span></code></a> where computation was single
threaded when <code class="docutils literal notranslate"><span class="pre">n_jobs</span> <span class="pre">&gt;</span> <span class="pre">1</span></code> or <code class="docutils literal notranslate"><span class="pre">n_jobs</span> <span class="pre">=</span> <span class="pre">-1</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12949">#12949</a> by <a class="reference external" href="https://github.com/nixphix">Prabakaran Kumaresshan</a>.</p></li>
</ul>
</div>
<div class="section" id="id3">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.compose" title="sklearn.compose"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.compose</span></code></a><a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.compose.ColumnTransformer.html#sklearn.compose.ColumnTransformer" title="sklearn.compose.ColumnTransformer"><code class="xref py py-class docutils literal notranslate"><span class="pre">compose.ColumnTransformer</span></code></a> to handle
negative indexes in the columns list of the transformers.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12946">#12946</a> by <a class="reference external" href="https://github.com/pierretallotte">Pierre Tallotte</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-covariance">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.covariance" title="sklearn.covariance"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.covariance</span></code></a><a class="headerlink" href="#sklearn-covariance" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a regression in <a class="reference internal" href="../modules/generated/sklearn.covariance.graphical_lasso.html#sklearn.covariance.graphical_lasso" title="sklearn.covariance.graphical_lasso"><code class="xref py py-func docutils literal notranslate"><span class="pre">covariance.graphical_lasso</span></code></a> so that
the case <code class="docutils literal notranslate"><span class="pre">n_features=2</span></code> is handled correctly. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/13276">#13276</a> by
<a class="reference external" href="https://github.com/bellet">Aurélien Bellet</a>.</p></li>
</ul>
</div>
<div class="section" id="id4">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.decomposition" title="sklearn.decomposition"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.decomposition</span></code></a><a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.decomposition.sparse_encode.html#sklearn.decomposition.sparse_encode" title="sklearn.decomposition.sparse_encode"><code class="xref py py-func docutils literal notranslate"><span class="pre">decomposition.sparse_encode</span></code></a> where computation was single
threaded when <code class="docutils literal notranslate"><span class="pre">n_jobs</span> <span class="pre">&gt;</span> <span class="pre">1</span></code> or <code class="docutils literal notranslate"><span class="pre">n_jobs</span> <span class="pre">=</span> <span class="pre">-1</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/13005">#13005</a> by <a class="reference external" href="https://github.com/nixphix">Prabakaran Kumaresshan</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-datasets">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.datasets" title="sklearn.datasets"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.datasets</span></code></a><a class="headerlink" href="#sklearn-datasets" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-info">Efficiency</span></span>  <a class="reference internal" href="../modules/generated/sklearn.datasets.fetch_openml.html#sklearn.datasets.fetch_openml" title="sklearn.datasets.fetch_openml"><code class="xref py py-func docutils literal notranslate"><span class="pre">sklearn.datasets.fetch_openml</span></code></a> now loads data by
streaming, avoiding high memory usage.  <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/13312">#13312</a> by <a class="reference external" href="https://github.com/jorisvandenbossche">Joris Van den
Bossche</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-feature-extraction">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.feature_extraction" title="sklearn.feature_extraction"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.feature_extraction</span></code></a><a class="headerlink" href="#sklearn-feature-extraction" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.feature_extraction.text.CountVectorizer.html#sklearn.feature_extraction.text.CountVectorizer" title="sklearn.feature_extraction.text.CountVectorizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">feature_extraction.text.CountVectorizer</span></code></a> which
would result in the sparse feature matrix having conflicting <code class="docutils literal notranslate"><span class="pre">indptr</span></code> and
<code class="docutils literal notranslate"><span class="pre">indices</span></code> precisions under very large vocabularies. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11295">#11295</a> by
<a class="reference external" href="https://github.com/gvacaliuc">Gabriel Vacaliuc</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-impute">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.impute" title="sklearn.impute"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.impute</span></code></a><a class="headerlink" href="#sklearn-impute" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  add support for non-numeric data in
<a class="reference internal" href="../modules/generated/sklearn.impute.MissingIndicator.html#sklearn.impute.MissingIndicator" title="sklearn.impute.MissingIndicator"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.impute.MissingIndicator</span></code></a> which was not supported while
<a class="reference internal" href="../modules/generated/sklearn.impute.SimpleImputer.html#sklearn.impute.SimpleImputer" title="sklearn.impute.SimpleImputer"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.impute.SimpleImputer</span></code></a> was supporting this for some
imputation strategies.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/13046">#13046</a> by <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-linear-model">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.linear_model" title="sklearn.linear_model"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.linear_model</span></code></a><a class="headerlink" href="#sklearn-linear-model" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.linear_model.MultiTaskElasticNet.html#sklearn.linear_model.MultiTaskElasticNet" title="sklearn.linear_model.MultiTaskElasticNet"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.MultiTaskElasticNet</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.linear_model.MultiTaskLasso.html#sklearn.linear_model.MultiTaskLasso" title="sklearn.linear_model.MultiTaskLasso"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.MultiTaskLasso</span></code></a> which were breaking when
<code class="docutils literal notranslate"><span class="pre">warm_start</span> <span class="pre">=</span> <span class="pre">True</span></code>. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12360">#12360</a> by <a class="reference external" href="https://github.com/joaak">Aakanksha Joshi</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-preprocessing">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.preprocessing" title="sklearn.preprocessing"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.preprocessing</span></code></a><a class="headerlink" href="#sklearn-preprocessing" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.preprocessing.KBinsDiscretizer.html#sklearn.preprocessing.KBinsDiscretizer" title="sklearn.preprocessing.KBinsDiscretizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.KBinsDiscretizer</span></code></a> where
<code class="docutils literal notranslate"><span class="pre">strategy='kmeans'</span></code> fails with an error during transformation due to unsorted
bin edges. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/13134">#13134</a> by <a class="reference external" href="https://github.com/SandroCasagrande">Sandro Casagrande</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.preprocessing.OneHotEncoder.html#sklearn.preprocessing.OneHotEncoder" title="sklearn.preprocessing.OneHotEncoder"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.OneHotEncoder</span></code></a> where the
deprecation of <code class="docutils literal notranslate"><span class="pre">categorical_features</span></code> was handled incorrectly in
combination with <code class="docutils literal notranslate"><span class="pre">handle_unknown='ignore'</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12881">#12881</a> by <a class="reference external" href="https://github.com/jorisvandenbossche">Joris Van den Bossche</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Bins whose width are too small (i.e., &lt;= 1e-8) are removed
with a warning in <a class="reference internal" href="../modules/generated/sklearn.preprocessing.KBinsDiscretizer.html#sklearn.preprocessing.KBinsDiscretizer" title="sklearn.preprocessing.KBinsDiscretizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.KBinsDiscretizer</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/13165">#13165</a> by <a class="reference external" href="https://github.com/qinhanmin2014">Hanmin Qin</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-svm">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.svm" title="sklearn.svm"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.svm</span></code></a><a class="headerlink" href="#sklearn-svm" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.svm.SVC.html#sklearn.svm.SVC" title="sklearn.svm.SVC"><code class="xref py py-class docutils literal notranslate"><span class="pre">svm.SVC</span></code></a>, <a class="reference internal" href="../modules/generated/sklearn.svm.NuSVC.html#sklearn.svm.NuSVC" title="sklearn.svm.NuSVC"><code class="xref py py-class docutils literal notranslate"><span class="pre">svm.NuSVC</span></code></a>, <a class="reference internal" href="../modules/generated/sklearn.svm.SVR.html#sklearn.svm.SVR" title="sklearn.svm.SVR"><code class="xref py py-class docutils literal notranslate"><span class="pre">svm.SVR</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.svm.NuSVR.html#sklearn.svm.NuSVR" title="sklearn.svm.NuSVR"><code class="xref py py-class docutils literal notranslate"><span class="pre">svm.NuSVR</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.svm.OneClassSVM.html#sklearn.svm.OneClassSVM" title="sklearn.svm.OneClassSVM"><code class="xref py py-class docutils literal notranslate"><span class="pre">svm.OneClassSVM</span></code></a> where the <code class="docutils literal notranslate"><span class="pre">scale</span></code> option
of parameter <code class="docutils literal notranslate"><span class="pre">gamma</span></code> is erroneously defined as
<code class="docutils literal notranslate"><span class="pre">1</span> <span class="pre">/</span> <span class="pre">(n_features</span> <span class="pre">*</span> <span class="pre">X.std())</span></code>. It’s now defined as
<code class="docutils literal notranslate"><span class="pre">1</span> <span class="pre">/</span> <span class="pre">(n_features</span> <span class="pre">*</span> <span class="pre">X.var())</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/13221">#13221</a> by <a class="reference external" href="https://github.com/qinhanmin2014">Hanmin Qin</a>.</p></li>
</ul>
</div>
</div>
<div class="section" id="code-and-documentation-contributors">
<h2>Code and Documentation Contributors<a class="headerlink" href="#code-and-documentation-contributors" title="Permalink to this headline">¶</a></h2>
<p>With thanks to:</p>
<p>Adrin Jalali, Agamemnon Krasoulis, Albert Thomas, Andreas Mueller, Aurélien
Bellet, bertrandhaut, Bharat Raghunathan, Dowon, Emmanuel Arias, Fibinse
Xavier, Finn O’Shea, Gabriel Vacaliuc, Gael Varoquaux, Guillaume Lemaitre,
Hanmin Qin, joaak, Joel Nothman, Joris Van den Bossche, Jérémie Méhault, kms15,
Kossori Aruku, Lakshya KD, maikia, Manuel López-Ibáñez, Marco Gorelli,
MarcoGorelli, mferrari3, Mickaël Schoentgen, Nicolas Hug, pavlos kallis, Pierre
Glaser, pierretallotte, Prabakaran Kumaresshan, Reshama Shaikh, Rohit Kapoor,
Roman Yurchak, SandroCasagrande, Tashay Green, Thomas Fan, Vishaal Kapoor,
Zhuyi Xue, Zijie (ZJ) Poh</p>
</div>
</div>
<div class="section" id="version-0-20-2">
<span id="changes-0-20-2"></span><h1>Version 0.20.2<a class="headerlink" href="#version-0-20-2" title="Permalink to this headline">¶</a></h1>
<p><strong>December 20, 2018</strong></p>
<p>This is a bug-fix release with some minor documentation improvements and
enhancements to features released in 0.20.0.</p>
<div class="section" id="changed-models">
<h2>Changed models<a class="headerlink" href="#changed-models" title="Permalink to this headline">¶</a></h2>
<p>The following estimators and functions, when fit with the same data and
parameters, may produce different models from the previous version. This often
occurs due to changes in the modelling logic (bug fixes or enhancements), or in
random sampling procedures.</p>
<ul class="simple">
<li><p><a class="reference internal" href="../modules/classes.html#module-sklearn.neighbors" title="sklearn.neighbors"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.neighbors</span></code></a> when <code class="docutils literal notranslate"><span class="pre">metric=='jaccard'</span></code> (bug fix)</p></li>
<li><p>use of <code class="docutils literal notranslate"><span class="pre">'seuclidean'</span></code> or <code class="docutils literal notranslate"><span class="pre">'mahalanobis'</span></code> metrics in some cases (bug fix)</p></li>
</ul>
</div>
<div class="section" id="id5">
<h2>Changelog<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id6">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.compose" title="sklearn.compose"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.compose</span></code></a><a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed an issue in <a class="reference internal" href="../modules/generated/sklearn.compose.make_column_transformer.html#sklearn.compose.make_column_transformer" title="sklearn.compose.make_column_transformer"><code class="xref py py-func docutils literal notranslate"><span class="pre">compose.make_column_transformer</span></code></a> which raises
unexpected error when columns is pandas Index or pandas Series.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12704">#12704</a> by <a class="reference external" href="https://github.com/qinhanmin2014">Hanmin Qin</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-metrics">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.metrics" title="sklearn.metrics"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.metrics</span></code></a><a class="headerlink" href="#sklearn-metrics" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.metrics.pairwise_distances.html#sklearn.metrics.pairwise_distances" title="sklearn.metrics.pairwise_distances"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.pairwise_distances</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.metrics.pairwise_distances_chunked.html#sklearn.metrics.pairwise_distances_chunked" title="sklearn.metrics.pairwise_distances_chunked"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.pairwise_distances_chunked</span></code></a> where parameters <code class="docutils literal notranslate"><span class="pre">V</span></code> of
<code class="docutils literal notranslate"><span class="pre">&quot;seuclidean&quot;</span></code> and <code class="docutils literal notranslate"><span class="pre">VI</span></code> of <code class="docutils literal notranslate"><span class="pre">&quot;mahalanobis&quot;</span></code> metrics were computed after
the data was split into chunks instead of being pre-computed on whole data.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12701">#12701</a> by <a class="reference external" href="https://github.com/jeremiedbb">Jeremie du Boisberranger</a>.</p></li>
</ul>
</div>
<div class="section" id="id7">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.neighbors" title="sklearn.neighbors"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.neighbors</span></code></a><a class="headerlink" href="#id7" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed <a class="reference internal" href="../modules/generated/sklearn.neighbors.DistanceMetric.html#sklearn.neighbors.DistanceMetric" title="sklearn.neighbors.DistanceMetric"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.neighbors.DistanceMetric</span></code></a> jaccard distance
function to return 0 when two all-zero vectors are compared.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12685">#12685</a> by <a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-utils">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.utils" title="sklearn.utils"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.utils</span></code></a><a class="headerlink" href="#sklearn-utils" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Calling <a class="reference internal" href="../modules/generated/sklearn.utils.check_array.html#sklearn.utils.check_array" title="sklearn.utils.check_array"><code class="xref py py-func docutils literal notranslate"><span class="pre">utils.check_array</span></code></a> on <code class="docutils literal notranslate"><span class="pre">pandas.Series</span></code> with categorical
data, which raised an error in 0.20.0, now returns the expected output again.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12699">#12699</a> by <a class="reference external" href="https://github.com/jorisvandenbossche">Joris Van den Bossche</a>.</p></li>
</ul>
</div>
</div>
<div class="section" id="id8">
<h2>Code and Documentation Contributors<a class="headerlink" href="#id8" title="Permalink to this headline">¶</a></h2>
<p>With thanks to:</p>
<p>adanhawth, Adrin Jalali, Albert Thomas, Andreas Mueller, Dan Stine, Feda Curic,
Hanmin Qin, Jan S, jeremiedbb, Joel Nothman, Joris Van den Bossche,
josephsalmon, Katrin Leinweber, Loic Esteve, Muhammad Hassaan Rafique, Nicolas
Hug, Olivier Grisel, Paul Paczuski, Reshama Shaikh, Sam Waterbury, Shivam
Kotwalia, Thomas Fan</p>
</div>
</div>
<div class="section" id="version-0-20-1">
<span id="changes-0-20-1"></span><h1>Version 0.20.1<a class="headerlink" href="#version-0-20-1" title="Permalink to this headline">¶</a></h1>
<p><strong>November 21, 2018</strong></p>
<p>This is a bug-fix release with some minor documentation improvements and
enhancements to features released in 0.20.0. Note that we also include some
API changes in this release, so you might get some extra warnings after
updating from 0.20.0 to 0.20.1.</p>
<div class="section" id="id9">
<h2>Changed models<a class="headerlink" href="#id9" title="Permalink to this headline">¶</a></h2>
<p>The following estimators and functions, when fit with the same data and
parameters, may produce different models from the previous version. This often
occurs due to changes in the modelling logic (bug fixes or enhancements), or in
random sampling procedures.</p>
<ul class="simple">
<li><p><a class="reference internal" href="../modules/generated/sklearn.decomposition.IncrementalPCA.html#sklearn.decomposition.IncrementalPCA" title="sklearn.decomposition.IncrementalPCA"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.IncrementalPCA</span></code></a> (bug fix)</p></li>
</ul>
</div>
<div class="section" id="id10">
<h2>Changelog<a class="headerlink" href="#id10" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id11">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.cluster" title="sklearn.cluster"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.cluster</span></code></a><a class="headerlink" href="#id11" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-info">Efficiency</span></span>  make <a class="reference internal" href="../modules/generated/sklearn.cluster.MeanShift.html#sklearn.cluster.MeanShift" title="sklearn.cluster.MeanShift"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.MeanShift</span></code></a> no longer try to do nested
parallelism as the overhead would hurt performance significantly when
<code class="docutils literal notranslate"><span class="pre">n_jobs</span> <span class="pre">&gt;</span> <span class="pre">1</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12159">#12159</a> by <a class="reference external" href="https://github.com/ogrisel">Olivier Grisel</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.cluster.DBSCAN.html#sklearn.cluster.DBSCAN" title="sklearn.cluster.DBSCAN"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.DBSCAN</span></code></a> with precomputed sparse neighbors
graph, which would add explicitly zeros on the diagonal even when already
present. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12105">#12105</a> by <a class="reference external" href="https://github.com/TomDLT">Tom Dupre la Tour</a>.</p></li>
</ul>
</div>
<div class="section" id="id12">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.compose" title="sklearn.compose"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.compose</span></code></a><a class="headerlink" href="#id12" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed an issue in <a class="reference internal" href="../modules/generated/sklearn.compose.ColumnTransformer.html#sklearn.compose.ColumnTransformer" title="sklearn.compose.ColumnTransformer"><code class="xref py py-class docutils literal notranslate"><span class="pre">compose.ColumnTransformer</span></code></a> when stacking
columns with types not convertible to a numeric.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11912">#11912</a> by <a class="reference external" href="https://github.com/adrinjalali">Adrin Jalali</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  <a class="reference internal" href="../modules/generated/sklearn.compose.ColumnTransformer.html#sklearn.compose.ColumnTransformer" title="sklearn.compose.ColumnTransformer"><code class="xref py py-class docutils literal notranslate"><span class="pre">compose.ColumnTransformer</span></code></a> now applies the <code class="docutils literal notranslate"><span class="pre">sparse_threshold</span></code>
even if all transformation results are sparse. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12304">#12304</a> by <a class="reference external" href="https://amueller.github.io/">Andreas
Müller</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  <a class="reference internal" href="../modules/generated/sklearn.compose.make_column_transformer.html#sklearn.compose.make_column_transformer" title="sklearn.compose.make_column_transformer"><code class="xref py py-func docutils literal notranslate"><span class="pre">compose.make_column_transformer</span></code></a> now expects
<code class="docutils literal notranslate"><span class="pre">(transformer,</span> <span class="pre">columns)</span></code> instead of <code class="docutils literal notranslate"><span class="pre">(columns,</span> <span class="pre">transformer)</span></code> to keep
consistent with <a class="reference internal" href="../modules/generated/sklearn.compose.ColumnTransformer.html#sklearn.compose.ColumnTransformer" title="sklearn.compose.ColumnTransformer"><code class="xref py py-class docutils literal notranslate"><span class="pre">compose.ColumnTransformer</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12339">#12339</a> by <a class="reference external" href="https://github.com/adrinjalali">Adrin Jalali</a>.</p></li>
</ul>
</div>
<div class="section" id="id13">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.datasets" title="sklearn.datasets"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.datasets</span></code></a><a class="headerlink" href="#id13" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  <a class="reference internal" href="../modules/generated/sklearn.datasets.fetch_openml.html#sklearn.datasets.fetch_openml" title="sklearn.datasets.fetch_openml"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.fetch_openml</span></code></a> to correctly use the local cache.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12246">#12246</a> by <a class="reference external" href="https://github.com/janvanrijn">Jan N. van Rijn</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  <a class="reference internal" href="../modules/generated/sklearn.datasets.fetch_openml.html#sklearn.datasets.fetch_openml" title="sklearn.datasets.fetch_openml"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.fetch_openml</span></code></a> to correctly handle ignore attributes and
row id attributes. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12330">#12330</a> by <a class="reference external" href="https://github.com/janvanrijn">Jan N. van Rijn</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed integer overflow in <a class="reference internal" href="../modules/generated/sklearn.datasets.make_classification.html#sklearn.datasets.make_classification" title="sklearn.datasets.make_classification"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.make_classification</span></code></a>
for values of <code class="docutils literal notranslate"><span class="pre">n_informative</span></code> parameter larger than 64.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10811">#10811</a> by <a class="reference external" href="https://github.com/VarIr">Roman Feldbauer</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed olivetti faces dataset <code class="docutils literal notranslate"><span class="pre">DESCR</span></code> attribute to point to the right
location in <a class="reference internal" href="../modules/generated/sklearn.datasets.fetch_olivetti_faces.html#sklearn.datasets.fetch_olivetti_faces" title="sklearn.datasets.fetch_olivetti_faces"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.fetch_olivetti_faces</span></code></a>. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12441">#12441</a> by
<a class="reference external" href="https://github.com/jeremiedbb">Jérémie du Boisberranger</a></p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  <a class="reference internal" href="../modules/generated/sklearn.datasets.fetch_openml.html#sklearn.datasets.fetch_openml" title="sklearn.datasets.fetch_openml"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.fetch_openml</span></code></a> to retry downloading when reading
from local cache fails. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12517">#12517</a> by <a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p></li>
</ul>
</div>
<div class="section" id="id14">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.decomposition" title="sklearn.decomposition"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.decomposition</span></code></a><a class="headerlink" href="#id14" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a regression in <a class="reference internal" href="../modules/generated/sklearn.decomposition.IncrementalPCA.html#sklearn.decomposition.IncrementalPCA" title="sklearn.decomposition.IncrementalPCA"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.IncrementalPCA</span></code></a> where
0.20.0 raised an error if the number of samples in the final batch for
fitting IncrementalPCA was smaller than n_components.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12234">#12234</a> by <a class="reference external" href="https://github.com/minggli">Ming Li</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-ensemble">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.ensemble" title="sklearn.ensemble"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.ensemble</span></code></a><a class="headerlink" href="#sklearn-ensemble" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug mostly affecting <a class="reference internal" href="../modules/generated/sklearn.ensemble.RandomForestClassifier.html#sklearn.ensemble.RandomForestClassifier" title="sklearn.ensemble.RandomForestClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.RandomForestClassifier</span></code></a>
where <code class="docutils literal notranslate"><span class="pre">class_weight='balanced_subsample'</span></code> failed with more than 32 classes.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12165">#12165</a> by <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug affecting <a class="reference internal" href="../modules/generated/sklearn.ensemble.BaggingClassifier.html#sklearn.ensemble.BaggingClassifier" title="sklearn.ensemble.BaggingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.BaggingClassifier</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.ensemble.BaggingRegressor.html#sklearn.ensemble.BaggingRegressor" title="sklearn.ensemble.BaggingRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.BaggingRegressor</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.ensemble.IsolationForest.html#sklearn.ensemble.IsolationForest" title="sklearn.ensemble.IsolationForest"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.IsolationForest</span></code></a>,
where <code class="docutils literal notranslate"><span class="pre">max_features</span></code> was sometimes rounded down to zero.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12388">#12388</a> by <a class="reference external" href="https://github.com/Connossor">Connor Tann</a>.</p></li>
</ul>
</div>
<div class="section" id="id15">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.feature_extraction" title="sklearn.feature_extraction"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.feature_extraction</span></code></a><a class="headerlink" href="#id15" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a regression in v0.20.0 where
<a class="reference internal" href="../modules/generated/sklearn.feature_extraction.text.CountVectorizer.html#sklearn.feature_extraction.text.CountVectorizer" title="sklearn.feature_extraction.text.CountVectorizer"><code class="xref py py-func docutils literal notranslate"><span class="pre">feature_extraction.text.CountVectorizer</span></code></a> and other text vectorizers
could error during stop words validation with custom preprocessors
or tokenizers. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12393">#12393</a> by <a class="reference external" href="https://github.com/rth">Roman Yurchak</a>.</p></li>
</ul>
</div>
<div class="section" id="id16">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.linear_model" title="sklearn.linear_model"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.linear_model</span></code></a><a class="headerlink" href="#id16" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  <a class="reference internal" href="../modules/generated/sklearn.linear_model.SGDClassifier.html#sklearn.linear_model.SGDClassifier" title="sklearn.linear_model.SGDClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.SGDClassifier</span></code></a> and variants
with <code class="docutils literal notranslate"><span class="pre">early_stopping=True</span></code> would not use a consistent validation
split in the multiclass case and this would cause a crash when using
those estimators as part of parallel parameter search or cross-validation.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12122">#12122</a> by <a class="reference external" href="https://github.com/ogrisel">Olivier Grisel</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug affecting <code class="xref py py-class docutils literal notranslate"><span class="pre">SGDClassifier</span></code> in the multiclass
case. Each one-versus-all step is run in a <a class="reference external" href="https://joblib.readthedocs.io/en/latest/generated/joblib.Parallel.html#joblib.Parallel" title="(in joblib v0.14.1.dev0)"><code class="xref py py-class docutils literal notranslate"><span class="pre">joblib.Parallel</span></code></a> call and
mutating a common parameter, causing a segmentation fault if called within a
backend using processes and not threads. We now use <code class="docutils literal notranslate"><span class="pre">require=sharedmem</span></code>
at the <a class="reference external" href="https://joblib.readthedocs.io/en/latest/generated/joblib.Parallel.html#joblib.Parallel" title="(in joblib v0.14.1.dev0)"><code class="xref py py-class docutils literal notranslate"><span class="pre">joblib.Parallel</span></code></a> instance creation. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12518">#12518</a> by
<a class="reference external" href="https://github.com/pierreglaser">Pierre Glaser</a> and <a class="reference external" href="https://github.com/ogrisel">Olivier Grisel</a>.</p></li>
</ul>
</div>
<div class="section" id="id17">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.metrics" title="sklearn.metrics"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.metrics</span></code></a><a class="headerlink" href="#id17" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.pairwise.pairwise_distances_argmin_min</span></code>
which returned the square root of the distance when the metric parameter was
set to “euclidean”. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12481">#12481</a> by
<a class="reference external" href="https://github.com/jeremiedbb">Jérémie du Boisberranger</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.pairwise.pairwise_distances_chunked</span></code>
which didn’t ensure the diagonal is zero for euclidean distances.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12612">#12612</a> by <a class="reference external" href="https://github.com/amueller">Andreas Müller</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  The <a class="reference internal" href="../modules/generated/sklearn.metrics.calinski_harabaz_score.html#sklearn.metrics.calinski_harabaz_score" title="sklearn.metrics.calinski_harabaz_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.calinski_harabaz_score</span></code></a> has been renamed to
<a class="reference internal" href="../modules/generated/sklearn.metrics.calinski_harabasz_score.html#sklearn.metrics.calinski_harabasz_score" title="sklearn.metrics.calinski_harabasz_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.calinski_harabasz_score</span></code></a> and will be removed in version 0.23.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12211">#12211</a> by <a class="reference external" href="https://github.com/LisaThomas9">Lisa Thomas</a>,
<a class="reference external" href="https://github.com/markhannel">Mark Hannel</a> and <a class="reference external" href="https://github.com/mferrari3">Melissa Ferrari</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-mixture">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.mixture" title="sklearn.mixture"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.mixture</span></code></a><a class="headerlink" href="#sklearn-mixture" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Ensure that the <code class="docutils literal notranslate"><span class="pre">fit_predict</span></code> method of
<a class="reference internal" href="../modules/generated/sklearn.mixture.GaussianMixture.html#sklearn.mixture.GaussianMixture" title="sklearn.mixture.GaussianMixture"><code class="xref py py-class docutils literal notranslate"><span class="pre">mixture.GaussianMixture</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.mixture.BayesianGaussianMixture.html#sklearn.mixture.BayesianGaussianMixture" title="sklearn.mixture.BayesianGaussianMixture"><code class="xref py py-class docutils literal notranslate"><span class="pre">mixture.BayesianGaussianMixture</span></code></a>
always yield assignments consistent with <code class="docutils literal notranslate"><span class="pre">fit</span></code> followed by <code class="docutils literal notranslate"><span class="pre">predict</span></code> even
if the convergence criterion is too loose or not met. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12451">#12451</a>
by <a class="reference external" href="https://github.com/ogrisel">Olivier Grisel</a>.</p></li>
</ul>
</div>
<div class="section" id="id18">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.neighbors" title="sklearn.neighbors"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.neighbors</span></code></a><a class="headerlink" href="#id18" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  force the parallelism backend to <code class="code docutils literal notranslate"><span class="pre">threading</span></code> for
<a class="reference internal" href="../modules/generated/sklearn.neighbors.KDTree.html#sklearn.neighbors.KDTree" title="sklearn.neighbors.KDTree"><code class="xref py py-class docutils literal notranslate"><span class="pre">neighbors.KDTree</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.neighbors.BallTree.html#sklearn.neighbors.BallTree" title="sklearn.neighbors.BallTree"><code class="xref py py-class docutils literal notranslate"><span class="pre">neighbors.BallTree</span></code></a> in Python 2.7 to
avoid pickling errors caused by the serialization of their methods.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12171">#12171</a> by <a class="reference external" href="https://github.com/tomMoral">Thomas Moreau</a>.</p></li>
</ul>
</div>
<div class="section" id="id19">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.preprocessing" title="sklearn.preprocessing"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.preprocessing</span></code></a><a class="headerlink" href="#id19" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed bug in <a class="reference internal" href="../modules/generated/sklearn.preprocessing.OrdinalEncoder.html#sklearn.preprocessing.OrdinalEncoder" title="sklearn.preprocessing.OrdinalEncoder"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.OrdinalEncoder</span></code></a> when passing
manually specified categories. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12365">#12365</a> by <a class="reference external" href="https://github.com/jorisvandenbossche">Joris Van den Bossche</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed bug in <a class="reference internal" href="../modules/generated/sklearn.preprocessing.KBinsDiscretizer.html#sklearn.preprocessing.KBinsDiscretizer" title="sklearn.preprocessing.KBinsDiscretizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.KBinsDiscretizer</span></code></a> where the
<code class="docutils literal notranslate"><span class="pre">transform</span></code> method mutates the <code class="docutils literal notranslate"><span class="pre">_encoder</span></code> attribute. The <code class="docutils literal notranslate"><span class="pre">transform</span></code>
method is now thread safe. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12514">#12514</a> by
<a class="reference external" href="https://github.com/qinhanmin2014">Hanmin Qin</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.preprocessing.PowerTransformer.html#sklearn.preprocessing.PowerTransformer" title="sklearn.preprocessing.PowerTransformer"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.PowerTransformer</span></code></a> where the
Yeo-Johnson transform was incorrect for lambda parameters outside of <code class="docutils literal notranslate"><span class="pre">[0,</span> <span class="pre">2]</span></code>
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12522">#12522</a> by <a class="reference external" href="https://github.com/NicolasHug">Nicolas Hug</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.preprocessing.OneHotEncoder.html#sklearn.preprocessing.OneHotEncoder" title="sklearn.preprocessing.OneHotEncoder"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.OneHotEncoder</span></code></a> where transform
failed when set to ignore unknown numpy strings of different lengths
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12471">#12471</a> by <a class="reference external" href="https://github.com/GMarzinotto">Gabriel Marzinotto</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  The default value of the <code class="code docutils literal notranslate"><span class="pre">method</span></code> argument in
<a class="reference internal" href="../modules/generated/sklearn.preprocessing.power_transform.html#sklearn.preprocessing.power_transform" title="sklearn.preprocessing.power_transform"><code class="xref py py-func docutils literal notranslate"><span class="pre">preprocessing.power_transform</span></code></a> will be changed from <code class="code docutils literal notranslate"><span class="pre">box-cox</span></code>
to <code class="code docutils literal notranslate"><span class="pre">yeo-johnson</span></code> to match <a class="reference internal" href="../modules/generated/sklearn.preprocessing.PowerTransformer.html#sklearn.preprocessing.PowerTransformer" title="sklearn.preprocessing.PowerTransformer"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.PowerTransformer</span></code></a>
in version 0.23. A FutureWarning is raised when the default value is used.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12317">#12317</a> by <a class="reference external" href="https://github.com/chang">Eric Chang</a>.</p></li>
</ul>
</div>
<div class="section" id="id20">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.utils" title="sklearn.utils"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.utils</span></code></a><a class="headerlink" href="#id20" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Use float64 for mean accumulator to avoid floating point
precision issues in <a class="reference internal" href="../modules/generated/sklearn.preprocessing.StandardScaler.html#sklearn.preprocessing.StandardScaler" title="sklearn.preprocessing.StandardScaler"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.StandardScaler</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.decomposition.IncrementalPCA.html#sklearn.decomposition.IncrementalPCA" title="sklearn.decomposition.IncrementalPCA"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.IncrementalPCA</span></code></a> when using float32 datasets.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12338">#12338</a> by <a class="reference external" href="https://github.com/bauks">bauks</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Calling <a class="reference internal" href="../modules/generated/sklearn.utils.check_array.html#sklearn.utils.check_array" title="sklearn.utils.check_array"><code class="xref py py-func docutils literal notranslate"><span class="pre">utils.check_array</span></code></a> on <code class="docutils literal notranslate"><span class="pre">pandas.Series</span></code>, which
raised an error in 0.20.0, now returns the expected output again.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12625">#12625</a> by <a class="reference external" href="https://amueller.github.io/">Andreas Müller</a></p></li>
</ul>
</div>
<div class="section" id="miscellaneous">
<h3>Miscellaneous<a class="headerlink" href="#miscellaneous" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  When using site joblib by setting the environment variable
<code class="docutils literal notranslate"><span class="pre">SKLEARN_SITE_JOBLIB</span></code>, added compatibility with joblib 0.11 in addition
to 0.12+. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12350">#12350</a> by <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a> and <a class="reference external" href="https://github.com/rth">Roman Yurchak</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Make sure to avoid raising <code class="docutils literal notranslate"><span class="pre">FutureWarning</span></code> when calling
<code class="docutils literal notranslate"><span class="pre">np.vstack</span></code> with numpy 1.16 and later (use list comprehensions
instead of generator expressions in many locations of the scikit-learn
code base). <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12467">#12467</a> by <a class="reference external" href="https://github.com/ogrisel">Olivier Grisel</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  Removed all mentions of <code class="docutils literal notranslate"><span class="pre">sklearn.externals.joblib</span></code>, and deprecated
joblib methods exposed in <code class="docutils literal notranslate"><span class="pre">sklearn.utils</span></code>, except for
<a class="reference internal" href="../modules/generated/sklearn.utils.parallel_backend.html#sklearn.utils.parallel_backend" title="sklearn.utils.parallel_backend"><code class="xref py py-func docutils literal notranslate"><span class="pre">utils.parallel_backend</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.utils.register_parallel_backend.html#sklearn.utils.register_parallel_backend" title="sklearn.utils.register_parallel_backend"><code class="xref py py-func docutils literal notranslate"><span class="pre">utils.register_parallel_backend</span></code></a>,
which allow users to configure parallel computation in scikit-learn.
Other functionalities are part of <a class="reference external" href="https://joblib.readthedocs.io/">joblib</a>.
package and should be used directly, by installing it.
The goal of this change is to prepare for
unvendoring joblib in future version of scikit-learn.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12345">#12345</a> by <a class="reference external" href="https://github.com/tomMoral">Thomas Moreau</a></p></li>
</ul>
</div>
</div>
<div class="section" id="id21">
<h2>Code and Documentation Contributors<a class="headerlink" href="#id21" title="Permalink to this headline">¶</a></h2>
<p>With thanks to:</p>
<p>^__^, Adrin Jalali, Andrea Navarrete, Andreas Mueller,
bauks, BenjaStudio, Cheuk Ting Ho, Connossor,
Corey Levinson, Dan Stine, daten-kieker, Denis Kataev,
Dillon Gardner, Dmitry Vukolov, Dougal J. Sutherland, Edward J Brown,
Eric Chang, Federico Caselli, Gabriel Marzinotto, Gael Varoquaux,
GauravAhlawat, Gustavo De Mari Pereira, Hanmin Qin, haroldfox,
JackLangerman, Jacopo Notarstefano, janvanrijn, jdethurens,
jeremiedbb, Joel Nothman, Joris Van den Bossche, Koen,
Kushal Chauhan, Lee Yi Jie Joel, Lily Xiong, mail-liam,
Mark Hannel, melsyt, Ming Li, Nicholas Smith,
Nicolas Hug, Nikolay Shebanov, Oleksandr Pavlyk, Olivier Grisel,
Peter Hausamann, Pierre Glaser, Pulkit Maloo, Quentin Batista,
Radostin Stoyanov, Ramil Nugmanov, Rebekah Kim, Reshama Shaikh,
Rohan Singh, Roman Feldbauer, Roman Yurchak, Roopam Sharma,
Sam Waterbury, Scott Lowe, Sebastian Raschka, Stephen Tierney,
SylvainLan, TakingItCasual, Thomas Fan, Thomas Moreau,
Tom Dupré la Tour, Tulio Casagrande, Utkarsh Upadhyay, Xing Han Lu,
Yaroslav Halchenko, Zach Miller</p>
</div>
</div>
<div class="section" id="version-0-20-0">
<span id="changes-0-20"></span><h1>Version 0.20.0<a class="headerlink" href="#version-0-20-0" title="Permalink to this headline">¶</a></h1>
<p><strong>September 25, 2018</strong></p>
<p>This release packs in a mountain of bug fixes, features and enhancements for
the Scikit-learn library, and improvements to the documentation and examples.
Thanks to our contributors!</p>
<p>This release is dedicated to the memory of Raghav Rajagopalan.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Version 0.20 is the last version of scikit-learn to support Python 2.7 and Python 3.4.
Scikit-learn 0.21 will require Python 3.5 or higher.</p>
</div>
<div class="section" id="highlights">
<h2>Highlights<a class="headerlink" href="#highlights" title="Permalink to this headline">¶</a></h2>
<p>We have tried to improve our support for common data-science use-cases
including missing values, categorical variables, heterogeneous data, and
features/targets with unusual distributions.
Missing values in features, represented by NaNs, are now accepted in
column-wise preprocessing such as scalers. Each feature is fitted disregarding
NaNs, and data containing NaNs can be transformed. The new <code class="xref py py-mod docutils literal notranslate"><span class="pre">impute</span></code>
module provides estimators for learning despite missing data.</p>
<p><a class="reference internal" href="../modules/generated/sklearn.compose.ColumnTransformer.html#sklearn.compose.ColumnTransformer" title="sklearn.compose.ColumnTransformer"><code class="xref py py-class docutils literal notranslate"><span class="pre">ColumnTransformer</span></code></a> handles the case where different features
or columns of a pandas.DataFrame need different preprocessing.
String or pandas Categorical columns can now be encoded with
<a class="reference internal" href="../modules/generated/sklearn.preprocessing.OneHotEncoder.html#sklearn.preprocessing.OneHotEncoder" title="sklearn.preprocessing.OneHotEncoder"><code class="xref py py-class docutils literal notranslate"><span class="pre">OneHotEncoder</span></code></a> or
<a class="reference internal" href="../modules/generated/sklearn.preprocessing.OrdinalEncoder.html#sklearn.preprocessing.OrdinalEncoder" title="sklearn.preprocessing.OrdinalEncoder"><code class="xref py py-class docutils literal notranslate"><span class="pre">OrdinalEncoder</span></code></a>.</p>
<p><a class="reference internal" href="../modules/generated/sklearn.compose.TransformedTargetRegressor.html#sklearn.compose.TransformedTargetRegressor" title="sklearn.compose.TransformedTargetRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">TransformedTargetRegressor</span></code></a> helps when the regression target
needs to be transformed to be modeled. <a class="reference internal" href="../modules/generated/sklearn.preprocessing.PowerTransformer.html#sklearn.preprocessing.PowerTransformer" title="sklearn.preprocessing.PowerTransformer"><code class="xref py py-class docutils literal notranslate"><span class="pre">PowerTransformer</span></code></a>
and <a class="reference internal" href="../modules/generated/sklearn.preprocessing.KBinsDiscretizer.html#sklearn.preprocessing.KBinsDiscretizer" title="sklearn.preprocessing.KBinsDiscretizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">KBinsDiscretizer</span></code></a> join
<a class="reference internal" href="../modules/generated/sklearn.preprocessing.QuantileTransformer.html#sklearn.preprocessing.QuantileTransformer" title="sklearn.preprocessing.QuantileTransformer"><code class="xref py py-class docutils literal notranslate"><span class="pre">QuantileTransformer</span></code></a> as non-linear transformations.</p>
<p>Beyond this, we have added <a class="reference internal" href="../glossary.html#term-sample-weight"><span class="xref std std-term">sample_weight</span></a> support to several estimators
(including <a class="reference internal" href="../modules/generated/sklearn.cluster.KMeans.html#sklearn.cluster.KMeans" title="sklearn.cluster.KMeans"><code class="xref py py-class docutils literal notranslate"><span class="pre">KMeans</span></code></a>, <a class="reference internal" href="../modules/generated/sklearn.linear_model.BayesianRidge.html#sklearn.linear_model.BayesianRidge" title="sklearn.linear_model.BayesianRidge"><code class="xref py py-class docutils literal notranslate"><span class="pre">BayesianRidge</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.neighbors.KernelDensity.html#sklearn.neighbors.KernelDensity" title="sklearn.neighbors.KernelDensity"><code class="xref py py-class docutils literal notranslate"><span class="pre">KernelDensity</span></code></a>) and improved stopping criteria in others
(including <a class="reference internal" href="../modules/generated/sklearn.neural_network.MLPRegressor.html#sklearn.neural_network.MLPRegressor" title="sklearn.neural_network.MLPRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">MLPRegressor</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.ensemble.GradientBoostingRegressor.html#sklearn.ensemble.GradientBoostingRegressor" title="sklearn.ensemble.GradientBoostingRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">GradientBoostingRegressor</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.linear_model.SGDRegressor.html#sklearn.linear_model.SGDRegressor" title="sklearn.linear_model.SGDRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">SGDRegressor</span></code></a>).</p>
<p>This release is also the first to be accompanied by a <a class="reference internal" href="../glossary.html#glossary"><span class="std std-ref">Glossary of Common Terms and API Elements</span></a> developed
by <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a>. The glossary is a reference resource to help users and
contributors become familiar with the terminology and conventions used in
Scikit-learn.</p>
<p>Sorry if your contribution didn’t make it into the highlights. There’s a lot
here…</p>
</div>
<div class="section" id="id22">
<h2>Changed models<a class="headerlink" href="#id22" title="Permalink to this headline">¶</a></h2>
<p>The following estimators and functions, when fit with the same data and
parameters, may produce different models from the previous version. This often
occurs due to changes in the modelling logic (bug fixes or enhancements), or in
random sampling procedures.</p>
<ul class="simple">
<li><p><a class="reference internal" href="../modules/generated/sklearn.cluster.MeanShift.html#sklearn.cluster.MeanShift" title="sklearn.cluster.MeanShift"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.MeanShift</span></code></a> (bug fix)</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.decomposition.IncrementalPCA.html#sklearn.decomposition.IncrementalPCA" title="sklearn.decomposition.IncrementalPCA"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.IncrementalPCA</span></code></a> in Python 2 (bug fix)</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.decomposition.SparsePCA.html#sklearn.decomposition.SparsePCA" title="sklearn.decomposition.SparsePCA"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.SparsePCA</span></code></a> (bug fix)</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.ensemble.GradientBoostingClassifier.html#sklearn.ensemble.GradientBoostingClassifier" title="sklearn.ensemble.GradientBoostingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.GradientBoostingClassifier</span></code></a> (bug fix affecting feature importances)</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.isotonic.IsotonicRegression.html#sklearn.isotonic.IsotonicRegression" title="sklearn.isotonic.IsotonicRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">isotonic.IsotonicRegression</span></code></a> (bug fix)</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.linear_model.ARDRegression.html#sklearn.linear_model.ARDRegression" title="sklearn.linear_model.ARDRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.ARDRegression</span></code></a> (bug fix)</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegressionCV.html#sklearn.linear_model.LogisticRegressionCV" title="sklearn.linear_model.LogisticRegressionCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LogisticRegressionCV</span></code></a> (bug fix)</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.linear_model.OrthogonalMatchingPursuit.html#sklearn.linear_model.OrthogonalMatchingPursuit" title="sklearn.linear_model.OrthogonalMatchingPursuit"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.OrthogonalMatchingPursuit</span></code></a> (bug fix)</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.linear_model.PassiveAggressiveClassifier.html#sklearn.linear_model.PassiveAggressiveClassifier" title="sklearn.linear_model.PassiveAggressiveClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.PassiveAggressiveClassifier</span></code></a> (bug fix)</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.linear_model.PassiveAggressiveRegressor.html#sklearn.linear_model.PassiveAggressiveRegressor" title="sklearn.linear_model.PassiveAggressiveRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.PassiveAggressiveRegressor</span></code></a> (bug fix)</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.linear_model.Perceptron.html#sklearn.linear_model.Perceptron" title="sklearn.linear_model.Perceptron"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.Perceptron</span></code></a> (bug fix)</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.linear_model.SGDClassifier.html#sklearn.linear_model.SGDClassifier" title="sklearn.linear_model.SGDClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.SGDClassifier</span></code></a> (bug fix)</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.linear_model.SGDRegressor.html#sklearn.linear_model.SGDRegressor" title="sklearn.linear_model.SGDRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.SGDRegressor</span></code></a> (bug fix)</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.metrics.roc_auc_score.html#sklearn.metrics.roc_auc_score" title="sklearn.metrics.roc_auc_score"><code class="xref py py-class docutils literal notranslate"><span class="pre">metrics.roc_auc_score</span></code></a> (bug fix)</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.metrics.roc_curve.html#sklearn.metrics.roc_curve" title="sklearn.metrics.roc_curve"><code class="xref py py-class docutils literal notranslate"><span class="pre">metrics.roc_curve</span></code></a> (bug fix)</p></li>
<li><p><code class="xref py py-class docutils literal notranslate"><span class="pre">neural_network.BaseMultilayerPerceptron</span></code> (bug fix)</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.neural_network.MLPClassifier.html#sklearn.neural_network.MLPClassifier" title="sklearn.neural_network.MLPClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">neural_network.MLPClassifier</span></code></a> (bug fix)</p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.neural_network.MLPRegressor.html#sklearn.neural_network.MLPRegressor" title="sklearn.neural_network.MLPRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">neural_network.MLPRegressor</span></code></a> (bug fix)</p></li>
<li><p>The v0.19.0 release notes failed to mention a backwards incompatibility with
<a class="reference internal" href="../modules/generated/sklearn.model_selection.StratifiedKFold.html#sklearn.model_selection.StratifiedKFold" title="sklearn.model_selection.StratifiedKFold"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.StratifiedKFold</span></code></a> when <code class="docutils literal notranslate"><span class="pre">shuffle=True</span></code> due to
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7823">#7823</a>.</p></li>
</ul>
<p>Details are listed in the changelog below.</p>
<p>(While we are trying to better inform users by providing this information, we
cannot assure that this list is complete.)</p>
</div>
<div class="section" id="known-major-bugs">
<h2>Known Major Bugs<a class="headerlink" href="#known-major-bugs" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11924">#11924</a>: <a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegressionCV.html#sklearn.linear_model.LogisticRegressionCV" title="sklearn.linear_model.LogisticRegressionCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LogisticRegressionCV</span></code></a> with
<code class="docutils literal notranslate"><span class="pre">solver='lbfgs'</span></code> and <code class="docutils literal notranslate"><span class="pre">multi_class='multinomial'</span></code> may be non-deterministic or
otherwise broken on macOS. This appears to be the case on Travis CI servers,
but has not been confirmed on personal MacBooks! This issue has been present
in previous releases.</p></li>
<li><p><a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9354">#9354</a>: <a class="reference internal" href="../modules/generated/sklearn.metrics.pairwise.euclidean_distances.html#sklearn.metrics.pairwise.euclidean_distances" title="sklearn.metrics.pairwise.euclidean_distances"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.pairwise.euclidean_distances</span></code></a> (which is used
several times throughout the library) gives results with poor precision,
which particularly affects its use with 32-bit float inputs. This became
more problematic in versions 0.18 and 0.19 when some algorithms were changed
to avoid casting 32-bit data into 64-bit.</p></li>
</ul>
</div>
<div class="section" id="id23">
<h2>Changelog<a class="headerlink" href="#id23" title="Permalink to this headline">¶</a></h2>
<p>Support for Python 3.3 has been officially dropped.</p>
<div class="section" id="id24">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.cluster" title="sklearn.cluster"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.cluster</span></code></a><a class="headerlink" href="#id24" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Major Feature</span></span>  <a class="reference internal" href="../modules/generated/sklearn.cluster.AgglomerativeClustering.html#sklearn.cluster.AgglomerativeClustering" title="sklearn.cluster.AgglomerativeClustering"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.AgglomerativeClustering</span></code></a> now supports Single
Linkage clustering via <code class="docutils literal notranslate"><span class="pre">linkage='single'</span></code>. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9372">#9372</a> by <a class="reference external" href="https://github.com/lmcinnes">Leland
McInnes</a> and <a class="reference external" href="https://github.com/sastels">Steve Astels</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  <a class="reference internal" href="../modules/generated/sklearn.cluster.KMeans.html#sklearn.cluster.KMeans" title="sklearn.cluster.KMeans"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.KMeans</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.cluster.MiniBatchKMeans.html#sklearn.cluster.MiniBatchKMeans" title="sklearn.cluster.MiniBatchKMeans"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.MiniBatchKMeans</span></code></a> now support
sample weights via new parameter <code class="docutils literal notranslate"><span class="pre">sample_weight</span></code> in <code class="docutils literal notranslate"><span class="pre">fit</span></code> function.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10933">#10933</a> by <a class="reference external" href="https://github.com/jnhansen">Johannes Hansen</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Efficiency</span></span>  <a class="reference internal" href="../modules/generated/sklearn.cluster.KMeans.html#sklearn.cluster.KMeans" title="sklearn.cluster.KMeans"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.KMeans</span></code></a>, <a class="reference internal" href="../modules/generated/sklearn.cluster.MiniBatchKMeans.html#sklearn.cluster.MiniBatchKMeans" title="sklearn.cluster.MiniBatchKMeans"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.MiniBatchKMeans</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.cluster.k_means.html#sklearn.cluster.k_means" title="sklearn.cluster.k_means"><code class="xref py py-func docutils literal notranslate"><span class="pre">cluster.k_means</span></code></a> passed with <code class="docutils literal notranslate"><span class="pre">algorithm='full'</span></code> now enforces
row-major ordering, improving runtime.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10471">#10471</a> by <a class="reference external" href="https://github.com/gxyd">Gaurav Dhingra</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Efficiency</span></span>  <a class="reference internal" href="../modules/generated/sklearn.cluster.DBSCAN.html#sklearn.cluster.DBSCAN" title="sklearn.cluster.DBSCAN"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.DBSCAN</span></code></a> now is parallelized according to <code class="docutils literal notranslate"><span class="pre">n_jobs</span></code>
regardless of <code class="docutils literal notranslate"><span class="pre">algorithm</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/8003">#8003</a> by <a class="reference external" href="https://github.com/recamshak">Joël Billaud</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span>  <a class="reference internal" href="../modules/generated/sklearn.cluster.KMeans.html#sklearn.cluster.KMeans" title="sklearn.cluster.KMeans"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.KMeans</span></code></a> now gives a warning if the number of
distinct clusters found is smaller than <code class="docutils literal notranslate"><span class="pre">n_clusters</span></code>. This may occur when
the number of distinct points in the data set is actually smaller than the
number of cluster one is looking for.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10059">#10059</a> by <a class="reference external" href="https://github.com/christianbraune79">Christian Braune</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug where the <code class="docutils literal notranslate"><span class="pre">fit</span></code> method of
<a class="reference internal" href="../modules/generated/sklearn.cluster.AffinityPropagation.html#sklearn.cluster.AffinityPropagation" title="sklearn.cluster.AffinityPropagation"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.AffinityPropagation</span></code></a> stored cluster
centers as 3d array instead of 2d array in case of non-convergence. For the
same class, fixed undefined and arbitrary behavior in case of training data
where all samples had equal similarity.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9612">#9612</a>. By <a class="reference external" href="https://github.com/jsamoocha">Jonatan Samoocha</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.cluster.spectral_clustering.html#sklearn.cluster.spectral_clustering" title="sklearn.cluster.spectral_clustering"><code class="xref py py-func docutils literal notranslate"><span class="pre">cluster.spectral_clustering</span></code></a> where the normalization of
the spectrum was using a division instead of a multiplication. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/8129">#8129</a>
by <a class="reference external" href="https://github.com/jmargeta">Jan Margeta</a>, <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>,
and <a class="reference external" href="https://github.com/devanshdalal">Devansh D.</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <code class="xref py py-func docutils literal notranslate"><span class="pre">cluster.k_means_elkan</span></code> where the returned
<code class="docutils literal notranslate"><span class="pre">iteration</span></code> was 1 less than the correct value. Also added the missing
<code class="docutils literal notranslate"><span class="pre">n_iter_</span></code> attribute in the docstring of <a class="reference internal" href="../modules/generated/sklearn.cluster.KMeans.html#sklearn.cluster.KMeans" title="sklearn.cluster.KMeans"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.KMeans</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11353">#11353</a> by <a class="reference external" href="https://github.com/jeremiedbb">Jeremie du Boisberranger</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.cluster.mean_shift.html#sklearn.cluster.mean_shift" title="sklearn.cluster.mean_shift"><code class="xref py py-func docutils literal notranslate"><span class="pre">cluster.mean_shift</span></code></a> where the assigned labels
were not deterministic if there were multiple clusters with the same
intensities.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11901">#11901</a> by <a class="reference external" href="https://github.com/adrinjalali">Adrin Jalali</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  Deprecate <code class="docutils literal notranslate"><span class="pre">pooling_func</span></code> unused parameter in
<a class="reference internal" href="../modules/generated/sklearn.cluster.AgglomerativeClustering.html#sklearn.cluster.AgglomerativeClustering" title="sklearn.cluster.AgglomerativeClustering"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.AgglomerativeClustering</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9875">#9875</a> by <a class="reference external" href="https://github.com/thechargedneutron">Kumar Ashutosh</a>.</p></li>
</ul>
</div>
<div class="section" id="id25">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.compose" title="sklearn.compose"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.compose</span></code></a><a class="headerlink" href="#id25" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p>New module.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Major Feature</span></span>  Added <a class="reference internal" href="../modules/generated/sklearn.compose.ColumnTransformer.html#sklearn.compose.ColumnTransformer" title="sklearn.compose.ColumnTransformer"><code class="xref py py-class docutils literal notranslate"><span class="pre">compose.ColumnTransformer</span></code></a>, which allows to
apply different transformers to different columns of arrays or pandas
DataFrames. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9012">#9012</a> by <a class="reference external" href="https://amueller.github.io/">Andreas Müller</a> and <a class="reference external" href="https://github.com/jorisvandenbossche">Joris Van den Bossche</a>,
and <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11315">#11315</a> by <a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Major Feature</span></span>  Added the <a class="reference internal" href="../modules/generated/sklearn.compose.TransformedTargetRegressor.html#sklearn.compose.TransformedTargetRegressor" title="sklearn.compose.TransformedTargetRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">compose.TransformedTargetRegressor</span></code></a> which
transforms the target y before fitting a regression model. The predictions
are mapped back to the original space via an inverse transform. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9041">#9041</a>
by <a class="reference external" href="https://amueller.github.io/">Andreas Müller</a> and <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
</ul>
</div>
<div class="section" id="id26">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.covariance" title="sklearn.covariance"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.covariance</span></code></a><a class="headerlink" href="#id26" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-info">Efficiency</span></span>  Runtime improvements to <a class="reference internal" href="../modules/generated/sklearn.covariance.GraphicalLasso.html#sklearn.covariance.GraphicalLasso" title="sklearn.covariance.GraphicalLasso"><code class="xref py py-class docutils literal notranslate"><span class="pre">covariance.GraphicalLasso</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9858">#9858</a> by <a class="reference external" href="https://github.com/stevendbrown">Steven Brown</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  The <code class="xref py py-func docutils literal notranslate"><span class="pre">covariance.graph_lasso</span></code>,
<code class="xref py py-class docutils literal notranslate"><span class="pre">covariance.GraphLasso</span></code> and <code class="xref py py-class docutils literal notranslate"><span class="pre">covariance.GraphLassoCV</span></code> have been
renamed to <a class="reference internal" href="../modules/generated/sklearn.covariance.graphical_lasso.html#sklearn.covariance.graphical_lasso" title="sklearn.covariance.graphical_lasso"><code class="xref py py-func docutils literal notranslate"><span class="pre">covariance.graphical_lasso</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.covariance.GraphicalLasso.html#sklearn.covariance.GraphicalLasso" title="sklearn.covariance.GraphicalLasso"><code class="xref py py-class docutils literal notranslate"><span class="pre">covariance.GraphicalLasso</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.covariance.GraphicalLassoCV.html#sklearn.covariance.GraphicalLassoCV" title="sklearn.covariance.GraphicalLassoCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">covariance.GraphicalLassoCV</span></code></a>
respectively and will be removed in version 0.22.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9993">#9993</a> by <a class="reference external" href="https://github.com/artiemq">Artiem Krinitsyn</a></p></li>
</ul>
</div>
<div class="section" id="id27">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.datasets" title="sklearn.datasets"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.datasets</span></code></a><a class="headerlink" href="#id27" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Major Feature</span></span>  Added <a class="reference internal" href="../modules/generated/sklearn.datasets.fetch_openml.html#sklearn.datasets.fetch_openml" title="sklearn.datasets.fetch_openml"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.fetch_openml</span></code></a> to fetch datasets from
<a class="reference external" href="https://openml.org">OpenML</a>. OpenML is a free, open data sharing platform
and will be used instead of mldata as it provides better service availability.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9908">#9908</a> by <a class="reference external" href="https://amueller.github.io/">Andreas Müller</a> and <a class="reference external" href="https://github.com/janvanrijn">Jan N. van Rijn</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  In <a class="reference internal" href="../modules/generated/sklearn.datasets.make_blobs.html#sklearn.datasets.make_blobs" title="sklearn.datasets.make_blobs"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.make_blobs</span></code></a>, one can now pass a list to the
<code class="docutils literal notranslate"><span class="pre">n_samples</span></code> parameter to indicate the number of samples to generate per
cluster. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/8617">#8617</a> by <a class="reference external" href="https://github.com/maskani-moh">Maskani Filali Mohamed</a> and
<a class="reference external" href="https://github.com/kkatrio">Konstantinos Katrioplas</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  Add <code class="docutils literal notranslate"><span class="pre">filename</span></code> attribute to <code class="xref py py-mod docutils literal notranslate"><span class="pre">datasets</span></code> that have a CSV file.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9101">#9101</a> by <a class="reference external" href="https://github.com/alex-33">alex-33</a>
and <a class="reference external" href="https://github.com/maskani-moh">Maskani Filali Mohamed</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  <code class="docutils literal notranslate"><span class="pre">return_X_y</span></code> parameter has been added to several dataset loaders.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10774">#10774</a> by <a class="reference external" href="https://github.com/ccatalfo">Chris Catalfo</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.datasets.load_boston.html#sklearn.datasets.load_boston" title="sklearn.datasets.load_boston"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.load_boston</span></code></a> which had a wrong data
point. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10795">#10795</a> by <a class="reference external" href="https://github.com/tarcusx">Takeshi Yoshizawa</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.datasets.load_iris.html#sklearn.datasets.load_iris" title="sklearn.datasets.load_iris"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.load_iris</span></code></a> which had two wrong data points.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11082">#11082</a> by <a class="reference external" href="https://github.com/rotuna">Sadhana Srinivasan</a>
and <a class="reference external" href="https://github.com/qinhanmin2014">Hanmin Qin</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.datasets.fetch_kddcup99.html#sklearn.datasets.fetch_kddcup99" title="sklearn.datasets.fetch_kddcup99"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.fetch_kddcup99</span></code></a>, where data were not
properly shuffled. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9731">#9731</a> by <a class="reference external" href="https://ngoix.github.io/">Nicolas Goix</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.datasets.make_circles.html#sklearn.datasets.make_circles" title="sklearn.datasets.make_circles"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.make_circles</span></code></a>, where no odd number of
data points could be generated. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10045">#10045</a> by <a class="reference external" href="https://github.com/christianbraune79">Christian Braune</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  Deprecated <code class="xref py py-func docutils literal notranslate"><span class="pre">sklearn.datasets.fetch_mldata</span></code> to be removed in
version 0.22. mldata.org is no longer operational. Until removal it will
remain possible to load cached datasets. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11466">#11466</a> by <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a>.</p></li>
</ul>
</div>
<div class="section" id="id28">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.decomposition" title="sklearn.decomposition"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.decomposition</span></code></a><a class="headerlink" href="#id28" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  <a class="reference internal" href="../modules/generated/sklearn.decomposition.dict_learning.html#sklearn.decomposition.dict_learning" title="sklearn.decomposition.dict_learning"><code class="xref py py-func docutils literal notranslate"><span class="pre">decomposition.dict_learning</span></code></a> functions and models now
support positivity constraints. This applies to the dictionary and sparse
code. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/6374">#6374</a> by <a class="reference external" href="https://github.com/jakirkham">John Kirkham</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  <span class="raw-html"><span class="badge badge-danger">Fix</span></span>  <a class="reference internal" href="../modules/generated/sklearn.decomposition.SparsePCA.html#sklearn.decomposition.SparsePCA" title="sklearn.decomposition.SparsePCA"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.SparsePCA</span></code></a> now exposes
<code class="docutils literal notranslate"><span class="pre">normalize_components</span></code>. When set to True, the train and test data are
centered with the train mean respectively during the fit phase and the
transform phase. This fixes the behavior of SparsePCA. When set to False,
which is the default, the previous abnormal behaviour still holds. The False
value is for backward compatibility and should not be used. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11585">#11585</a>
by <a class="reference external" href="https://github.com/FollowKenny">Ivan Panico</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Efficiency</span></span>  Efficiency improvements in <a class="reference internal" href="../modules/generated/sklearn.decomposition.dict_learning.html#sklearn.decomposition.dict_learning" title="sklearn.decomposition.dict_learning"><code class="xref py py-func docutils literal notranslate"><span class="pre">decomposition.dict_learning</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11420">#11420</a> and others by <a class="reference external" href="https://github.com/jakirkham">John Kirkham</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fix for uninformative error in <a class="reference internal" href="../modules/generated/sklearn.decomposition.IncrementalPCA.html#sklearn.decomposition.IncrementalPCA" title="sklearn.decomposition.IncrementalPCA"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.IncrementalPCA</span></code></a>:
now an error is raised if the number of components is larger than the
chosen batch size. The <code class="docutils literal notranslate"><span class="pre">n_components=None</span></code> case was adapted accordingly.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/6452">#6452</a>. By <a class="reference external" href="https://github.com/wallygauze">Wally Gauze</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug where the <code class="docutils literal notranslate"><span class="pre">partial_fit</span></code> method of
<a class="reference internal" href="../modules/generated/sklearn.decomposition.IncrementalPCA.html#sklearn.decomposition.IncrementalPCA" title="sklearn.decomposition.IncrementalPCA"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.IncrementalPCA</span></code></a> used integer division instead of float
division on Python 2.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9492">#9492</a> by <a class="reference external" href="https://github.com/jrbourbeau">James Bourbeau</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  In <a class="reference internal" href="../modules/generated/sklearn.decomposition.PCA.html#sklearn.decomposition.PCA" title="sklearn.decomposition.PCA"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.PCA</span></code></a> selecting a n_components parameter greater
than the number of samples now raises an error. Similarly, the
<code class="docutils literal notranslate"><span class="pre">n_components=None</span></code> case now selects the minimum of <code class="docutils literal notranslate"><span class="pre">n_samples</span></code> and
<code class="docutils literal notranslate"><span class="pre">n_features</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/8484">#8484</a> by <a class="reference external" href="https://github.com/wallygauze">Wally Gauze</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.decomposition.PCA.html#sklearn.decomposition.PCA" title="sklearn.decomposition.PCA"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.PCA</span></code></a> where users will get
unexpected error with large datasets when <code class="docutils literal notranslate"><span class="pre">n_components='mle'</span></code> on Python 3
versions.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9886">#9886</a> by <a class="reference external" href="https://github.com/qinhanmin2014">Hanmin Qin</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed an underflow in calculating KL-divergence for
<a class="reference internal" href="../modules/generated/sklearn.decomposition.NMF.html#sklearn.decomposition.NMF" title="sklearn.decomposition.NMF"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.NMF</span></code></a> <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10142">#10142</a> by <a class="reference external" href="https://github.com/TomDLT">Tom Dupre la Tour</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.decomposition.SparseCoder.html#sklearn.decomposition.SparseCoder" title="sklearn.decomposition.SparseCoder"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.SparseCoder</span></code></a> when running OMP
sparse coding in parallel using read-only memory mapped datastructures.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/5956">#5956</a> by <a class="reference external" href="https://github.com/vighneshbirodkar">Vighnesh Birodkar</a> and
<a class="reference external" href="https://github.com/ogrisel">Olivier Grisel</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-discriminant-analysis">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.discriminant_analysis" title="sklearn.discriminant_analysis"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.discriminant_analysis</span></code></a><a class="headerlink" href="#sklearn-discriminant-analysis" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-info">Efficiency</span></span>  Memory usage improvement for <code class="xref py py-func docutils literal notranslate"><span class="pre">_class_means</span></code> and
<code class="xref py py-func docutils literal notranslate"><span class="pre">_class_cov</span></code> in <code class="xref py py-mod docutils literal notranslate"><span class="pre">discriminant_analysis</span></code>. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10898">#10898</a> by
<a class="reference external" href="https://github.com/bobchennan">Nanxin Chen</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-dummy">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.dummy" title="sklearn.dummy"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.dummy</span></code></a><a class="headerlink" href="#sklearn-dummy" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  <a class="reference internal" href="../modules/generated/sklearn.dummy.DummyRegressor.html#sklearn.dummy.DummyRegressor" title="sklearn.dummy.DummyRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">dummy.DummyRegressor</span></code></a> now has a <code class="docutils literal notranslate"><span class="pre">return_std</span></code> option in its
<code class="docutils literal notranslate"><span class="pre">predict</span></code> method. The returned standard deviations will be zeros.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  <a class="reference internal" href="../modules/generated/sklearn.dummy.DummyClassifier.html#sklearn.dummy.DummyClassifier" title="sklearn.dummy.DummyClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">dummy.DummyClassifier</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.dummy.DummyRegressor.html#sklearn.dummy.DummyRegressor" title="sklearn.dummy.DummyRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">dummy.DummyRegressor</span></code></a> now
only require X to be an object with finite length or shape. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9832">#9832</a> by
<a class="reference external" href="https://github.com/vrishank97">Vrishank Bhardwaj</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  <a class="reference internal" href="../modules/generated/sklearn.dummy.DummyClassifier.html#sklearn.dummy.DummyClassifier" title="sklearn.dummy.DummyClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">dummy.DummyClassifier</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.dummy.DummyRegressor.html#sklearn.dummy.DummyRegressor" title="sklearn.dummy.DummyRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">dummy.DummyRegressor</span></code></a>
can now be scored without supplying test samples.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11951">#11951</a> by <a class="reference external" href="https://github.com/JarnoRFB">Rüdiger Busche</a>.</p></li>
</ul>
</div>
<div class="section" id="id29">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.ensemble" title="sklearn.ensemble"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.ensemble</span></code></a><a class="headerlink" href="#id29" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  <a class="reference internal" href="../modules/generated/sklearn.ensemble.BaggingRegressor.html#sklearn.ensemble.BaggingRegressor" title="sklearn.ensemble.BaggingRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.BaggingRegressor</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.ensemble.BaggingClassifier.html#sklearn.ensemble.BaggingClassifier" title="sklearn.ensemble.BaggingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.BaggingClassifier</span></code></a> can now be fit with missing/non-finite
values in X and/or multi-output Y to support wrapping pipelines that perform
their own imputation. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9707">#9707</a> by <a class="reference external" href="https://github.com/jimmywan">Jimmy Wan</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  <a class="reference internal" href="../modules/generated/sklearn.ensemble.GradientBoostingClassifier.html#sklearn.ensemble.GradientBoostingClassifier" title="sklearn.ensemble.GradientBoostingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.GradientBoostingClassifier</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.ensemble.GradientBoostingRegressor.html#sklearn.ensemble.GradientBoostingRegressor" title="sklearn.ensemble.GradientBoostingRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.GradientBoostingRegressor</span></code></a> now support early stopping
via <code class="docutils literal notranslate"><span class="pre">n_iter_no_change</span></code>, <code class="docutils literal notranslate"><span class="pre">validation_fraction</span></code> and <code class="docutils literal notranslate"><span class="pre">tol</span></code>. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7071">#7071</a>
by <a class="reference external" href="https://github.com/raghavrv">Raghav RV</a></p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  Added <code class="docutils literal notranslate"><span class="pre">named_estimators_</span></code> parameter in
<a class="reference internal" href="../modules/generated/sklearn.ensemble.VotingClassifier.html#sklearn.ensemble.VotingClassifier" title="sklearn.ensemble.VotingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.VotingClassifier</span></code></a> to access fitted estimators.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9157">#9157</a> by <a class="reference external" href="https://github.com/herilalaina">Herilalaina Rakotoarison</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug when fitting <a class="reference internal" href="../modules/generated/sklearn.ensemble.GradientBoostingClassifier.html#sklearn.ensemble.GradientBoostingClassifier" title="sklearn.ensemble.GradientBoostingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.GradientBoostingClassifier</span></code></a> or
<a class="reference internal" href="../modules/generated/sklearn.ensemble.GradientBoostingRegressor.html#sklearn.ensemble.GradientBoostingRegressor" title="sklearn.ensemble.GradientBoostingRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.GradientBoostingRegressor</span></code></a> with <code class="docutils literal notranslate"><span class="pre">warm_start=True</span></code> which
previously raised a segmentation fault due to a non-conversion of CSC matrix
into CSR format expected by <code class="docutils literal notranslate"><span class="pre">decision_function</span></code>. Similarly, Fortran-ordered
arrays are converted to C-ordered arrays in the dense case. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9991">#9991</a> by
<a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.ensemble.GradientBoostingRegressor.html#sklearn.ensemble.GradientBoostingRegressor" title="sklearn.ensemble.GradientBoostingRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.GradientBoostingRegressor</span></code></a>
and <a class="reference internal" href="../modules/generated/sklearn.ensemble.GradientBoostingClassifier.html#sklearn.ensemble.GradientBoostingClassifier" title="sklearn.ensemble.GradientBoostingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.GradientBoostingClassifier</span></code></a> to have
feature importances summed and then normalized, rather than normalizing on a
per-tree basis. The previous behavior over-weighted the Gini importance of
features that appear in later stages. This issue only affected feature
importances. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11176">#11176</a> by <a class="reference external" href="https://github.com/gforsyth">Gil Forsyth</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  The default value of the <code class="docutils literal notranslate"><span class="pre">n_estimators</span></code> parameter of
<a class="reference internal" href="../modules/generated/sklearn.ensemble.RandomForestClassifier.html#sklearn.ensemble.RandomForestClassifier" title="sklearn.ensemble.RandomForestClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.RandomForestClassifier</span></code></a>, <a class="reference internal" href="../modules/generated/sklearn.ensemble.RandomForestRegressor.html#sklearn.ensemble.RandomForestRegressor" title="sklearn.ensemble.RandomForestRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.RandomForestRegressor</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.ensemble.ExtraTreesClassifier.html#sklearn.ensemble.ExtraTreesClassifier" title="sklearn.ensemble.ExtraTreesClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.ExtraTreesClassifier</span></code></a>, <a class="reference internal" href="../modules/generated/sklearn.ensemble.ExtraTreesRegressor.html#sklearn.ensemble.ExtraTreesRegressor" title="sklearn.ensemble.ExtraTreesRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.ExtraTreesRegressor</span></code></a>,
and <a class="reference internal" href="../modules/generated/sklearn.ensemble.RandomTreesEmbedding.html#sklearn.ensemble.RandomTreesEmbedding" title="sklearn.ensemble.RandomTreesEmbedding"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.RandomTreesEmbedding</span></code></a> will change from 10 in version 0.20
to 100 in 0.22. A FutureWarning is raised when the default value is used.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11542">#11542</a> by <a class="reference external" href="https://github.com/annaayzenshtat">Anna Ayzenshtat</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  Classes derived from <code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.BaseBagging</span></code>. The attribute
<code class="docutils literal notranslate"><span class="pre">estimators_samples_</span></code> will return a list of arrays containing the indices
selected for each bootstrap instead of a list of arrays containing the mask
of the samples selected for each bootstrap. Indices allows to repeat samples
while mask does not allow this functionality.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9524">#9524</a> by <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  <code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.BaseBagging</span></code> where one could not deterministically
reproduce <code class="docutils literal notranslate"><span class="pre">fit</span></code> result using the object attributes when <code class="docutils literal notranslate"><span class="pre">random_state</span></code>
is set. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9723">#9723</a> by <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
</ul>
</div>
<div class="section" id="id30">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.feature_extraction" title="sklearn.feature_extraction"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.feature_extraction</span></code></a><a class="headerlink" href="#id30" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  Enable the call to <a class="reference internal" href="../glossary.html#term-get-feature-names"><span class="xref std std-term">get_feature_names</span></a> in unfitted
<a class="reference internal" href="../modules/generated/sklearn.feature_extraction.text.CountVectorizer.html#sklearn.feature_extraction.text.CountVectorizer" title="sklearn.feature_extraction.text.CountVectorizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">feature_extraction.text.CountVectorizer</span></code></a> initialized with a
vocabulary. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10908">#10908</a> by <a class="reference external" href="https://github.com/maskani-moh">Mohamed Maskani</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span>  <code class="docutils literal notranslate"><span class="pre">idf_</span></code> can now be set on a
<a class="reference internal" href="../modules/generated/sklearn.feature_extraction.text.TfidfTransformer.html#sklearn.feature_extraction.text.TfidfTransformer" title="sklearn.feature_extraction.text.TfidfTransformer"><code class="xref py py-class docutils literal notranslate"><span class="pre">feature_extraction.text.TfidfTransformer</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10899">#10899</a> by <a class="reference external" href="https://github.com/serega">Sergey Melderis</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.feature_extraction.image.extract_patches_2d.html#sklearn.feature_extraction.image.extract_patches_2d" title="sklearn.feature_extraction.image.extract_patches_2d"><code class="xref py py-func docutils literal notranslate"><span class="pre">feature_extraction.image.extract_patches_2d</span></code></a> which
would throw an exception if <code class="docutils literal notranslate"><span class="pre">max_patches</span></code> was greater than or equal to the
number of all possible patches rather than simply returning the number of
possible patches. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10101">#10101</a> by <a class="reference external" href="https://github.com/varunagrawal">Varun Agrawal</a></p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.feature_extraction.text.CountVectorizer.html#sklearn.feature_extraction.text.CountVectorizer" title="sklearn.feature_extraction.text.CountVectorizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">feature_extraction.text.CountVectorizer</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.feature_extraction.text.TfidfVectorizer.html#sklearn.feature_extraction.text.TfidfVectorizer" title="sklearn.feature_extraction.text.TfidfVectorizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">feature_extraction.text.TfidfVectorizer</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.feature_extraction.text.HashingVectorizer.html#sklearn.feature_extraction.text.HashingVectorizer" title="sklearn.feature_extraction.text.HashingVectorizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">feature_extraction.text.HashingVectorizer</span></code></a> to support 64 bit sparse
array indexing necessary to process large datasets with more than 2·10⁹ tokens
(words or n-grams). <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9147">#9147</a> by <a class="reference external" href="https://github.com/mannby">Claes-Fredrik Mannby</a>
and <a class="reference external" href="https://github.com/rth">Roman Yurchak</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed bug in <a class="reference internal" href="../modules/generated/sklearn.feature_extraction.text.TfidfVectorizer.html#sklearn.feature_extraction.text.TfidfVectorizer" title="sklearn.feature_extraction.text.TfidfVectorizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">feature_extraction.text.TfidfVectorizer</span></code></a> which
was ignoring the parameter <code class="docutils literal notranslate"><span class="pre">dtype</span></code>. In addition,
<a class="reference internal" href="../modules/generated/sklearn.feature_extraction.text.TfidfTransformer.html#sklearn.feature_extraction.text.TfidfTransformer" title="sklearn.feature_extraction.text.TfidfTransformer"><code class="xref py py-class docutils literal notranslate"><span class="pre">feature_extraction.text.TfidfTransformer</span></code></a> will preserve <code class="docutils literal notranslate"><span class="pre">dtype</span></code>
for floating and raise a warning if <code class="docutils literal notranslate"><span class="pre">dtype</span></code> requested is integer.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10441">#10441</a> by <a class="reference external" href="https://github.com/maykulkarni">Mayur Kulkarni</a> and
<a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-feature-selection">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.feature_selection" title="sklearn.feature_selection"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.feature_selection</span></code></a><a class="headerlink" href="#sklearn-feature-selection" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  Added select K best features functionality to
<a class="reference internal" href="../modules/generated/sklearn.feature_selection.SelectFromModel.html#sklearn.feature_selection.SelectFromModel" title="sklearn.feature_selection.SelectFromModel"><code class="xref py py-class docutils literal notranslate"><span class="pre">feature_selection.SelectFromModel</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/6689">#6689</a> by <a class="reference external" href="https://github.com/nsheth12">Nihar Sheth</a> and
<a class="reference external" href="https://github.com/qmaruf">Quazi Rahman</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  Added <code class="docutils literal notranslate"><span class="pre">min_features_to_select</span></code> parameter to
<a class="reference internal" href="../modules/generated/sklearn.feature_selection.RFECV.html#sklearn.feature_selection.RFECV" title="sklearn.feature_selection.RFECV"><code class="xref py py-class docutils literal notranslate"><span class="pre">feature_selection.RFECV</span></code></a> to bound evaluated features counts.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11293">#11293</a> by <a class="reference external" href="https://github.com/brentyi">Brent Yi</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  <a class="reference internal" href="../modules/generated/sklearn.feature_selection.RFECV.html#sklearn.feature_selection.RFECV" title="sklearn.feature_selection.RFECV"><code class="xref py py-class docutils literal notranslate"><span class="pre">feature_selection.RFECV</span></code></a>’s fit method now supports
<a class="reference internal" href="../glossary.html#term-groups"><span class="xref std std-term">groups</span></a>.  <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9656">#9656</a> by <a class="reference external" href="https://github.com/adamgreenhall">Adam Greenhall</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed computation of <code class="docutils literal notranslate"><span class="pre">n_features_to_compute</span></code> for edge case with tied
CV scores in <a class="reference internal" href="../modules/generated/sklearn.feature_selection.RFECV.html#sklearn.feature_selection.RFECV" title="sklearn.feature_selection.RFECV"><code class="xref py py-class docutils literal notranslate"><span class="pre">feature_selection.RFECV</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9222">#9222</a> by <a class="reference external" href="https://github.com/nickypie">Nick Hoh</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-gaussian-process">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.gaussian_process" title="sklearn.gaussian_process"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.gaussian_process</span></code></a><a class="headerlink" href="#sklearn-gaussian-process" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-info">Efficiency</span></span>  In <a class="reference internal" href="../modules/generated/sklearn.gaussian_process.GaussianProcessRegressor.html#sklearn.gaussian_process.GaussianProcessRegressor" title="sklearn.gaussian_process.GaussianProcessRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">gaussian_process.GaussianProcessRegressor</span></code></a>, method
<code class="docutils literal notranslate"><span class="pre">predict</span></code> is faster when using <code class="docutils literal notranslate"><span class="pre">return_std=True</span></code> in particular more when
called several times in a row. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9234">#9234</a> by <a class="reference external" href="https://github.com/andrewww">andrewww</a>
and <a class="reference external" href="https://github.com/minghui-liu">Minghui Liu</a>.</p></li>
</ul>
</div>
<div class="section" id="id31">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.impute" title="sklearn.impute"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.impute</span></code></a><a class="headerlink" href="#id31" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p>New module, adopting <code class="docutils literal notranslate"><span class="pre">preprocessing.Imputer</span></code> as
<a class="reference internal" href="../modules/generated/sklearn.impute.SimpleImputer.html#sklearn.impute.SimpleImputer" title="sklearn.impute.SimpleImputer"><code class="xref py py-class docutils literal notranslate"><span class="pre">impute.SimpleImputer</span></code></a> with minor changes (see under preprocessing
below).</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Major Feature</span></span>  Added <a class="reference internal" href="../modules/generated/sklearn.impute.MissingIndicator.html#sklearn.impute.MissingIndicator" title="sklearn.impute.MissingIndicator"><code class="xref py py-class docutils literal notranslate"><span class="pre">impute.MissingIndicator</span></code></a> which generates a
binary indicator for missing values. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/8075">#8075</a> by <a class="reference external" href="https://github.com/maniteja123">Maniteja Nandana</a> and <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  The <a class="reference internal" href="../modules/generated/sklearn.impute.SimpleImputer.html#sklearn.impute.SimpleImputer" title="sklearn.impute.SimpleImputer"><code class="xref py py-class docutils literal notranslate"><span class="pre">impute.SimpleImputer</span></code></a> has a new strategy,
<code class="docutils literal notranslate"><span class="pre">'constant'</span></code>, to complete missing values with a fixed one, given by the
<code class="docutils literal notranslate"><span class="pre">fill_value</span></code> parameter. This strategy supports numeric and non-numeric
data, and so does the <code class="docutils literal notranslate"><span class="pre">'most_frequent'</span></code> strategy now. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11211">#11211</a> by
<a class="reference external" href="https://github.com/jeremiedbb">Jeremie du Boisberranger</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-isotonic">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.isotonic" title="sklearn.isotonic"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.isotonic</span></code></a><a class="headerlink" href="#sklearn-isotonic" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.isotonic.IsotonicRegression.html#sklearn.isotonic.IsotonicRegression" title="sklearn.isotonic.IsotonicRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">isotonic.IsotonicRegression</span></code></a> which incorrectly
combined weights when fitting a model to data involving points with
identical X values.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9484">#9484</a> by <a class="reference external" href="https://github.com/dallascard">Dallas Card</a></p></li>
</ul>
</div>
<div class="section" id="id32">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.linear_model" title="sklearn.linear_model"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.linear_model</span></code></a><a class="headerlink" href="#id32" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  <a class="reference internal" href="../modules/generated/sklearn.linear_model.SGDClassifier.html#sklearn.linear_model.SGDClassifier" title="sklearn.linear_model.SGDClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.SGDClassifier</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.linear_model.SGDRegressor.html#sklearn.linear_model.SGDRegressor" title="sklearn.linear_model.SGDRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.SGDRegressor</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.linear_model.PassiveAggressiveClassifier.html#sklearn.linear_model.PassiveAggressiveClassifier" title="sklearn.linear_model.PassiveAggressiveClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.PassiveAggressiveClassifier</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.linear_model.PassiveAggressiveRegressor.html#sklearn.linear_model.PassiveAggressiveRegressor" title="sklearn.linear_model.PassiveAggressiveRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.PassiveAggressiveRegressor</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.linear_model.Perceptron.html#sklearn.linear_model.Perceptron" title="sklearn.linear_model.Perceptron"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.Perceptron</span></code></a> now expose <code class="docutils literal notranslate"><span class="pre">early_stopping</span></code>,
<code class="docutils literal notranslate"><span class="pre">validation_fraction</span></code> and <code class="docutils literal notranslate"><span class="pre">n_iter_no_change</span></code> parameters, to stop
optimization monitoring the score on a validation set. A new learning rate
<code class="docutils literal notranslate"><span class="pre">&quot;adaptive&quot;</span></code> strategy divides the learning rate by 5 each time
<code class="docutils literal notranslate"><span class="pre">n_iter_no_change</span></code> consecutive epochs fail to improve the model.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9043">#9043</a> by <a class="reference external" href="https://github.com/TomDLT">Tom Dupre la Tour</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  Add <code class="docutils literal notranslate"><span class="pre">sample_weight</span></code> parameter to the fit method of
<a class="reference internal" href="../modules/generated/sklearn.linear_model.BayesianRidge.html#sklearn.linear_model.BayesianRidge" title="sklearn.linear_model.BayesianRidge"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.BayesianRidge</span></code></a> for weighted linear regression.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10112">#10112</a> by <a class="reference external" href="https://github.com/pstjohn">Peter St. John</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <code class="xref py py-func docutils literal notranslate"><span class="pre">logistic.logistic_regression_path</span></code> to ensure
that the returned coefficients are correct when <code class="docutils literal notranslate"><span class="pre">multiclass='multinomial'</span></code>.
Previously, some of the coefficients would override each other, leading to
incorrect results in <a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegressionCV.html#sklearn.linear_model.LogisticRegressionCV" title="sklearn.linear_model.LogisticRegressionCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LogisticRegressionCV</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11724">#11724</a> by <a class="reference external" href="https://github.com/NicolasHug">Nicolas Hug</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegression.html#sklearn.linear_model.LogisticRegression" title="sklearn.linear_model.LogisticRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LogisticRegression</span></code></a> where when using
the parameter <code class="docutils literal notranslate"><span class="pre">multi_class='multinomial'</span></code>, the <code class="docutils literal notranslate"><span class="pre">predict_proba</span></code> method was
returning incorrect probabilities in the case of binary outcomes.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9939">#9939</a> by <a class="reference external" href="https://github.com/rwolst">Roger Westover</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegressionCV.html#sklearn.linear_model.LogisticRegressionCV" title="sklearn.linear_model.LogisticRegressionCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LogisticRegressionCV</span></code></a> where the
<code class="docutils literal notranslate"><span class="pre">score</span></code> method always computes accuracy, not the metric given by
the <code class="docutils literal notranslate"><span class="pre">scoring</span></code> parameter.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10998">#10998</a> by <a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegressionCV.html#sklearn.linear_model.LogisticRegressionCV" title="sklearn.linear_model.LogisticRegressionCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LogisticRegressionCV</span></code></a> where the
‘ovr’ strategy was always used to compute cross-validation scores in the
multiclass setting, even if <code class="docutils literal notranslate"><span class="pre">'multinomial'</span></code> was set.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/8720">#8720</a> by <a class="reference external" href="https://github.com/wdevazelhes">William de Vazelhes</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.linear_model.OrthogonalMatchingPursuit.html#sklearn.linear_model.OrthogonalMatchingPursuit" title="sklearn.linear_model.OrthogonalMatchingPursuit"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.OrthogonalMatchingPursuit</span></code></a> that was
broken when setting <code class="docutils literal notranslate"><span class="pre">normalize=False</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10071">#10071</a> by <a class="reference external" href="http://alexandre.gramfort.net">Alexandre Gramfort</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.linear_model.ARDRegression.html#sklearn.linear_model.ARDRegression" title="sklearn.linear_model.ARDRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.ARDRegression</span></code></a> which caused
incorrectly updated estimates for the standard deviation and the
coefficients. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10153">#10153</a> by <a class="reference external" href="https://github.com/jdoepfert">Jörg Döpfert</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.linear_model.ARDRegression.html#sklearn.linear_model.ARDRegression" title="sklearn.linear_model.ARDRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.ARDRegression</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.linear_model.BayesianRidge.html#sklearn.linear_model.BayesianRidge" title="sklearn.linear_model.BayesianRidge"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.BayesianRidge</span></code></a> which caused NaN predictions when fitted
with a constant target.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10095">#10095</a> by <a class="reference external" href="https://github.com/jdoepfert">Jörg Döpfert</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.linear_model.RidgeClassifierCV.html#sklearn.linear_model.RidgeClassifierCV" title="sklearn.linear_model.RidgeClassifierCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.RidgeClassifierCV</span></code></a> where
the parameter <code class="docutils literal notranslate"><span class="pre">store_cv_values</span></code> was not implemented though
it was documented in <code class="docutils literal notranslate"><span class="pre">cv_values</span></code> as a way to set up the storage
of cross-validation values for different alphas. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10297">#10297</a> by
<a class="reference external" href="https://github.com/mabelvj">Mabel Villalba-Jiménez</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.linear_model.ElasticNet.html#sklearn.linear_model.ElasticNet" title="sklearn.linear_model.ElasticNet"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.ElasticNet</span></code></a> which caused the input
to be overridden when using parameter <code class="docutils literal notranslate"><span class="pre">copy_X=True</span></code> and
<code class="docutils literal notranslate"><span class="pre">check_input=False</span></code>. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10581">#10581</a> by <a class="reference external" href="https://github.com/ymazari">Yacine Mazari</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.linear_model.Lasso.html#sklearn.linear_model.Lasso" title="sklearn.linear_model.Lasso"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.linear_model.Lasso</span></code></a>
where the coefficient had wrong shape when <code class="docutils literal notranslate"><span class="pre">fit_intercept=False</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10687">#10687</a> by <a class="reference external" href="https://github.com/martin-hahn">Martin Hahn</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegression.html#sklearn.linear_model.LogisticRegression" title="sklearn.linear_model.LogisticRegression"><code class="xref py py-func docutils literal notranslate"><span class="pre">sklearn.linear_model.LogisticRegression</span></code></a> where the
<code class="docutils literal notranslate"><span class="pre">multi_class='multinomial'</span></code> with binary output <code class="docutils literal notranslate"><span class="pre">with</span> <span class="pre">warm_start=True</span></code>
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10836">#10836</a> by <a class="reference external" href="https://github.com/aishgrt1">Aishwarya Srinivasan</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.linear_model.RidgeCV.html#sklearn.linear_model.RidgeCV" title="sklearn.linear_model.RidgeCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.RidgeCV</span></code></a> where using integer
<code class="docutils literal notranslate"><span class="pre">alphas</span></code> raised an error.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10397">#10397</a> by <a class="reference external" href="https://github.com/mabelvj">Mabel Villalba-Jiménez</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed condition triggering gap computation in
<a class="reference internal" href="../modules/generated/sklearn.linear_model.Lasso.html#sklearn.linear_model.Lasso" title="sklearn.linear_model.Lasso"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.Lasso</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.linear_model.ElasticNet.html#sklearn.linear_model.ElasticNet" title="sklearn.linear_model.ElasticNet"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.ElasticNet</span></code></a> when working
with sparse matrices. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10992">#10992</a> by <a class="reference external" href="http://alexandre.gramfort.net">Alexandre Gramfort</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.linear_model.SGDClassifier.html#sklearn.linear_model.SGDClassifier" title="sklearn.linear_model.SGDClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.SGDClassifier</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.linear_model.SGDRegressor.html#sklearn.linear_model.SGDRegressor" title="sklearn.linear_model.SGDRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.SGDRegressor</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.linear_model.PassiveAggressiveClassifier.html#sklearn.linear_model.PassiveAggressiveClassifier" title="sklearn.linear_model.PassiveAggressiveClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.PassiveAggressiveClassifier</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.linear_model.PassiveAggressiveRegressor.html#sklearn.linear_model.PassiveAggressiveRegressor" title="sklearn.linear_model.PassiveAggressiveRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.PassiveAggressiveRegressor</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.linear_model.Perceptron.html#sklearn.linear_model.Perceptron" title="sklearn.linear_model.Perceptron"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.Perceptron</span></code></a>, where the stopping criterion was stopping
the algorithm before convergence. A parameter <code class="docutils literal notranslate"><span class="pre">n_iter_no_change</span></code> was added
and set by default to 5. Previous behavior is equivalent to setting the
parameter to 1. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9043">#9043</a> by <a class="reference external" href="https://github.com/TomDLT">Tom Dupre la Tour</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug where liblinear and libsvm-based estimators would segfault
if passed a scipy.sparse matrix with 64-bit indices. They now raise a
ValueError.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11327">#11327</a> by <a class="reference external" href="https://github.com/kdhingra307">Karan Dhingra</a> and <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  The default values of the <code class="docutils literal notranslate"><span class="pre">solver</span></code> and <code class="docutils literal notranslate"><span class="pre">multi_class</span></code> parameters of
<a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegression.html#sklearn.linear_model.LogisticRegression" title="sklearn.linear_model.LogisticRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LogisticRegression</span></code></a> will change respectively from
<code class="docutils literal notranslate"><span class="pre">'liblinear'</span></code> and <code class="docutils literal notranslate"><span class="pre">'ovr'</span></code> in version 0.20 to <code class="docutils literal notranslate"><span class="pre">'lbfgs'</span></code> and
<code class="docutils literal notranslate"><span class="pre">'auto'</span></code> in version 0.22. A FutureWarning is raised when the default
values are used. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11905">#11905</a> by <a class="reference external" href="https://github.com/TomDLT">Tom Dupre la Tour</a> and <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  Deprecate <code class="docutils literal notranslate"><span class="pre">positive=True</span></code> option in <a class="reference internal" href="../modules/generated/sklearn.linear_model.Lars.html#sklearn.linear_model.Lars" title="sklearn.linear_model.Lars"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.Lars</span></code></a> as
the underlying implementation is broken. Use <a class="reference internal" href="../modules/generated/sklearn.linear_model.Lasso.html#sklearn.linear_model.Lasso" title="sklearn.linear_model.Lasso"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.Lasso</span></code></a>
instead. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9837">#9837</a> by <a class="reference external" href="http://alexandre.gramfort.net">Alexandre Gramfort</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  <code class="docutils literal notranslate"><span class="pre">n_iter_</span></code> may vary from previous releases in
<a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegression.html#sklearn.linear_model.LogisticRegression" title="sklearn.linear_model.LogisticRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LogisticRegression</span></code></a> with <code class="docutils literal notranslate"><span class="pre">solver='lbfgs'</span></code> and
<a class="reference internal" href="../modules/generated/sklearn.linear_model.HuberRegressor.html#sklearn.linear_model.HuberRegressor" title="sklearn.linear_model.HuberRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.HuberRegressor</span></code></a>. For Scipy &lt;= 1.0.0, the optimizer could
perform more than the requested maximum number of iterations. Now both
estimators will report at most <code class="docutils literal notranslate"><span class="pre">max_iter</span></code> iterations even if more were
performed. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10723">#10723</a> by <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-manifold">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.manifold" title="sklearn.manifold"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.manifold</span></code></a><a class="headerlink" href="#sklearn-manifold" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-info">Efficiency</span></span>  Speed improvements for both ‘exact’ and ‘barnes_hut’ methods in
<a class="reference internal" href="../modules/generated/sklearn.manifold.TSNE.html#sklearn.manifold.TSNE" title="sklearn.manifold.TSNE"><code class="xref py py-class docutils literal notranslate"><span class="pre">manifold.TSNE</span></code></a>. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10593">#10593</a> and <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10610">#10610</a> by
<a class="reference external" href="https://github.com/TomDLT">Tom Dupre la Tour</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  Support sparse input in <a class="reference internal" href="../modules/generated/sklearn.manifold.Isomap.html#sklearn.manifold.Isomap.fit" title="sklearn.manifold.Isomap.fit"><code class="xref py py-meth docutils literal notranslate"><span class="pre">manifold.Isomap.fit</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/8554">#8554</a> by <a class="reference external" href="https://github.com/lmcinnes">Leland McInnes</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  <code class="xref py py-func docutils literal notranslate"><span class="pre">manifold.t_sne.trustworthiness</span></code> accepts metrics other than
Euclidean. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9775">#9775</a> by <a class="reference external" href="https://github.com/wdevazelhes">William de Vazelhes</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.manifold.spectral_embedding.html#sklearn.manifold.spectral_embedding" title="sklearn.manifold.spectral_embedding"><code class="xref py py-func docutils literal notranslate"><span class="pre">manifold.spectral_embedding</span></code></a> where the
normalization of the spectrum was using a division instead of a
multiplication. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/8129">#8129</a> by <a class="reference external" href="https://github.com/jmargeta">Jan Margeta</a>,
<a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>, and <a class="reference external" href="https://github.com/devanshdalal">Devansh D.</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  <span class="raw-html"><span class="badge badge-success">Feature</span></span>  Deprecate <code class="docutils literal notranslate"><span class="pre">precomputed</span></code> parameter in function
<code class="xref py py-func docutils literal notranslate"><span class="pre">manifold.t_sne.trustworthiness</span></code>. Instead, the new parameter <code class="docutils literal notranslate"><span class="pre">metric</span></code>
should be used with any compatible metric including ‘precomputed’, in which
case the input matrix <code class="docutils literal notranslate"><span class="pre">X</span></code> should be a matrix of pairwise distances or
squared distances. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9775">#9775</a> by <a class="reference external" href="https://github.com/wdevazelhes">William de Vazelhes</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  Deprecate <code class="docutils literal notranslate"><span class="pre">precomputed</span></code> parameter in function
<code class="xref py py-func docutils literal notranslate"><span class="pre">manifold.t_sne.trustworthiness</span></code>. Instead, the new parameter
<code class="docutils literal notranslate"><span class="pre">metric</span></code> should be used with any compatible metric including
‘precomputed’, in which case the input matrix <code class="docutils literal notranslate"><span class="pre">X</span></code> should be a matrix of
pairwise distances or squared distances. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9775">#9775</a> by
<a class="reference external" href="https://github.com/wdevazelhes">William de Vazelhes</a>.</p></li>
</ul>
</div>
<div class="section" id="id33">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.metrics" title="sklearn.metrics"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.metrics</span></code></a><a class="headerlink" href="#id33" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Major Feature</span></span>  Added the <a class="reference internal" href="../modules/generated/sklearn.metrics.davies_bouldin_score.html#sklearn.metrics.davies_bouldin_score" title="sklearn.metrics.davies_bouldin_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.davies_bouldin_score</span></code></a> metric for
evaluation of clustering models without a ground truth. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10827">#10827</a> by
<a class="reference external" href="https://github.com/logc">Luis Osa</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Major Feature</span></span>  Added the <a class="reference internal" href="../modules/generated/sklearn.metrics.balanced_accuracy_score.html#sklearn.metrics.balanced_accuracy_score" title="sklearn.metrics.balanced_accuracy_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.balanced_accuracy_score</span></code></a> metric and
a corresponding <code class="docutils literal notranslate"><span class="pre">'balanced_accuracy'</span></code> scorer for binary and multiclass
classification. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/8066">#8066</a> by <a class="reference external" href="https://github.com/xyguo">&#64;xyguo</a> and <a class="reference external" href="https://github.com/dalmia">Aman Dalmia</a>, and <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10587">#10587</a> by <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  Partial AUC is available via <code class="docutils literal notranslate"><span class="pre">max_fpr</span></code> parameter in
<a class="reference internal" href="../modules/generated/sklearn.metrics.roc_auc_score.html#sklearn.metrics.roc_auc_score" title="sklearn.metrics.roc_auc_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.roc_auc_score</span></code></a>. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/3840">#3840</a> by
<a class="reference external" href="https://github.com/Alexander-N">Alexander Niederbühl</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  A scorer based on <a class="reference internal" href="../modules/generated/sklearn.metrics.brier_score_loss.html#sklearn.metrics.brier_score_loss" title="sklearn.metrics.brier_score_loss"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.brier_score_loss</span></code></a> is also
available. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9521">#9521</a> by <a class="reference external" href="https://github.com/qinhanmin2014">Hanmin Qin</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  Added control over the normalization in
<a class="reference internal" href="../modules/generated/sklearn.metrics.normalized_mutual_info_score.html#sklearn.metrics.normalized_mutual_info_score" title="sklearn.metrics.normalized_mutual_info_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.normalized_mutual_info_score</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.metrics.adjusted_mutual_info_score.html#sklearn.metrics.adjusted_mutual_info_score" title="sklearn.metrics.adjusted_mutual_info_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.adjusted_mutual_info_score</span></code></a> via the <code class="docutils literal notranslate"><span class="pre">average_method</span></code>
parameter. In version 0.22, the default normalizer for each will become
the <em>arithmetic</em> mean of the entropies of each clustering. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11124">#11124</a> by
<a class="reference external" href="https://github.com/aryamccarthy">Arya McCarthy</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  Added <code class="docutils literal notranslate"><span class="pre">output_dict</span></code> parameter in <a class="reference internal" href="../modules/generated/sklearn.metrics.classification_report.html#sklearn.metrics.classification_report" title="sklearn.metrics.classification_report"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.classification_report</span></code></a>
to return classification statistics as dictionary.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11160">#11160</a> by <a class="reference external" href="https://github.com/danielbarkhorn">Dan Barkhorn</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  <a class="reference internal" href="../modules/generated/sklearn.metrics.classification_report.html#sklearn.metrics.classification_report" title="sklearn.metrics.classification_report"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.classification_report</span></code></a> now reports all applicable averages on
the given data, including micro, macro and weighted average as well as samples
average for multilabel data. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11679">#11679</a> by <a class="reference external" href="https://github.com/apacha">Alexander Pacha</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  <a class="reference internal" href="../modules/generated/sklearn.metrics.average_precision_score.html#sklearn.metrics.average_precision_score" title="sklearn.metrics.average_precision_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.average_precision_score</span></code></a> now supports binary
<code class="docutils literal notranslate"><span class="pre">y_true</span></code> other than <code class="docutils literal notranslate"><span class="pre">{0,</span> <span class="pre">1}</span></code> or <code class="docutils literal notranslate"><span class="pre">{-1,</span> <span class="pre">1}</span></code> through <code class="docutils literal notranslate"><span class="pre">pos_label</span></code>
parameter. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9980">#9980</a> by <a class="reference external" href="https://github.com/qinhanmin2014">Hanmin Qin</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  <a class="reference internal" href="../modules/generated/sklearn.metrics.label_ranking_average_precision_score.html#sklearn.metrics.label_ranking_average_precision_score" title="sklearn.metrics.label_ranking_average_precision_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.label_ranking_average_precision_score</span></code></a> now supports
<code class="docutils literal notranslate"><span class="pre">sample_weight</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10845">#10845</a> by <a class="reference external" href="https://github.com/jopepato">Jose Perez-Parras Toledano</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  Add <code class="docutils literal notranslate"><span class="pre">dense_output</span></code> parameter to <a class="reference internal" href="../modules/generated/sklearn.metrics.pairwise.linear_kernel.html#sklearn.metrics.pairwise.linear_kernel" title="sklearn.metrics.pairwise.linear_kernel"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.pairwise.linear_kernel</span></code></a>.
When False and both inputs are sparse, will return a sparse matrix.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10999">#10999</a> by <a class="reference external" href="https://github.com/tgsmith61591">Taylor G Smith</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Efficiency</span></span>  <a class="reference internal" href="../modules/generated/sklearn.metrics.silhouette_score.html#sklearn.metrics.silhouette_score" title="sklearn.metrics.silhouette_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.silhouette_score</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.metrics.silhouette_samples.html#sklearn.metrics.silhouette_samples" title="sklearn.metrics.silhouette_samples"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.silhouette_samples</span></code></a> are more memory efficient and run
faster. This avoids some reported freezes and MemoryErrors.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11135">#11135</a> by <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.metrics.precision_recall_fscore_support.html#sklearn.metrics.precision_recall_fscore_support" title="sklearn.metrics.precision_recall_fscore_support"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.precision_recall_fscore_support</span></code></a>
when truncated <code class="docutils literal notranslate"><span class="pre">range(n_labels)</span></code> is passed as value for <code class="docutils literal notranslate"><span class="pre">labels</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10377">#10377</a> by <a class="reference external" href="https://github.com/gxyd">Gaurav Dhingra</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug due to floating point error in
<a class="reference internal" href="../modules/generated/sklearn.metrics.roc_auc_score.html#sklearn.metrics.roc_auc_score" title="sklearn.metrics.roc_auc_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.roc_auc_score</span></code></a> with non-integer sample weights. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9786">#9786</a>
by <a class="reference external" href="https://github.com/qinhanmin2014">Hanmin Qin</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug where <a class="reference internal" href="../modules/generated/sklearn.metrics.roc_curve.html#sklearn.metrics.roc_curve" title="sklearn.metrics.roc_curve"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.roc_curve</span></code></a> sometimes starts on y-axis
instead of (0, 0), which is inconsistent with the document and other
implementations. Note that this will not influence the result from
<a class="reference internal" href="../modules/generated/sklearn.metrics.roc_auc_score.html#sklearn.metrics.roc_auc_score" title="sklearn.metrics.roc_auc_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.roc_auc_score</span></code></a> <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10093">#10093</a> by <a class="reference external" href="https://github.com/alexryndin">alexryndin</a> and <a class="reference external" href="https://github.com/qinhanmin2014">Hanmin Qin</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug to avoid integer overflow. Casted product to 64 bits integer in
<a class="reference internal" href="../modules/generated/sklearn.metrics.mutual_info_score.html#sklearn.metrics.mutual_info_score" title="sklearn.metrics.mutual_info_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.mutual_info_score</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9772">#9772</a> by <a class="reference external" href="https://github.com/thechargedneutron">Kumar Ashutosh</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug where <a class="reference internal" href="../modules/generated/sklearn.metrics.average_precision_score.html#sklearn.metrics.average_precision_score" title="sklearn.metrics.average_precision_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.average_precision_score</span></code></a> will sometimes return
<code class="docutils literal notranslate"><span class="pre">nan</span></code> when <code class="docutils literal notranslate"><span class="pre">sample_weight</span></code> contains 0.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9980">#9980</a> by <a class="reference external" href="https://github.com/qinhanmin2014">Hanmin Qin</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.metrics.fowlkes_mallows_score.html#sklearn.metrics.fowlkes_mallows_score" title="sklearn.metrics.fowlkes_mallows_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.fowlkes_mallows_score</span></code></a> to avoid integer
overflow. Casted return value of <code class="docutils literal notranslate"><span class="pre">contingency_matrix</span></code> to <code class="docutils literal notranslate"><span class="pre">int64</span></code> and computed
product of square roots rather than square root of product.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9515">#9515</a> by <a class="reference external" href="https://github.com/aliddell">Alan Liddell</a> and
<a class="reference external" href="https://github.com/manhdao">Manh Dao</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  Deprecate <code class="docutils literal notranslate"><span class="pre">reorder</span></code> parameter in <a class="reference internal" href="../modules/generated/sklearn.metrics.auc.html#sklearn.metrics.auc" title="sklearn.metrics.auc"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.auc</span></code></a> as it’s no
longer required for <a class="reference internal" href="../modules/generated/sklearn.metrics.roc_auc_score.html#sklearn.metrics.roc_auc_score" title="sklearn.metrics.roc_auc_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.roc_auc_score</span></code></a>. Moreover using
<code class="docutils literal notranslate"><span class="pre">reorder=True</span></code> can hide bugs due to floating point error in the input.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9851">#9851</a> by <a class="reference external" href="https://github.com/qinhanmin2014">Hanmin Qin</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  In <a class="reference internal" href="../modules/generated/sklearn.metrics.normalized_mutual_info_score.html#sklearn.metrics.normalized_mutual_info_score" title="sklearn.metrics.normalized_mutual_info_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.normalized_mutual_info_score</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.metrics.adjusted_mutual_info_score.html#sklearn.metrics.adjusted_mutual_info_score" title="sklearn.metrics.adjusted_mutual_info_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.adjusted_mutual_info_score</span></code></a>, warn that
<code class="docutils literal notranslate"><span class="pre">average_method</span></code> will have a new default value. In version 0.22, the
default normalizer for each will become the <em>arithmetic</em> mean of the
entropies of each clustering. Currently,
<a class="reference internal" href="../modules/generated/sklearn.metrics.normalized_mutual_info_score.html#sklearn.metrics.normalized_mutual_info_score" title="sklearn.metrics.normalized_mutual_info_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.normalized_mutual_info_score</span></code></a> uses the default of
<code class="docutils literal notranslate"><span class="pre">average_method='geometric'</span></code>, and
<a class="reference internal" href="../modules/generated/sklearn.metrics.adjusted_mutual_info_score.html#sklearn.metrics.adjusted_mutual_info_score" title="sklearn.metrics.adjusted_mutual_info_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.adjusted_mutual_info_score</span></code></a> uses the default of
<code class="docutils literal notranslate"><span class="pre">average_method='max'</span></code> to match their behaviors in version 0.19.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11124">#11124</a> by <a class="reference external" href="https://github.com/aryamccarthy">Arya McCarthy</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  The <code class="docutils literal notranslate"><span class="pre">batch_size</span></code> parameter to <a class="reference internal" href="../modules/generated/sklearn.metrics.pairwise_distances_argmin_min.html#sklearn.metrics.pairwise_distances_argmin_min" title="sklearn.metrics.pairwise_distances_argmin_min"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.pairwise_distances_argmin_min</span></code></a>
and <a class="reference internal" href="../modules/generated/sklearn.metrics.pairwise_distances_argmin.html#sklearn.metrics.pairwise_distances_argmin" title="sklearn.metrics.pairwise_distances_argmin"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.pairwise_distances_argmin</span></code></a> is deprecated to be removed in
v0.22. It no longer has any effect, as batch size is determined by global
<code class="docutils literal notranslate"><span class="pre">working_memory</span></code> config. See <a class="reference internal" href="../modules/computing.html#working-memory"><span class="std std-ref">Limiting Working Memory</span></a>. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10280">#10280</a> by <a class="reference external" href="https://joelnothman.com/">Joel
Nothman</a> and <a class="reference external" href="https://github.com/dalmia">Aman Dalmia</a>.</p></li>
</ul>
</div>
<div class="section" id="id34">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.mixture" title="sklearn.mixture"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.mixture</span></code></a><a class="headerlink" href="#id34" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  Added function <a class="reference internal" href="../glossary.html#term-fit-predict"><span class="xref std std-term">fit_predict</span></a> to <a class="reference internal" href="../modules/generated/sklearn.mixture.GaussianMixture.html#sklearn.mixture.GaussianMixture" title="sklearn.mixture.GaussianMixture"><code class="xref py py-class docutils literal notranslate"><span class="pre">mixture.GaussianMixture</span></code></a>
and <a class="reference internal" href="../modules/generated/sklearn.mixture.GaussianMixture.html#sklearn.mixture.GaussianMixture" title="sklearn.mixture.GaussianMixture"><code class="xref py py-class docutils literal notranslate"><span class="pre">mixture.GaussianMixture</span></code></a>, which is essentially equivalent to
calling <a class="reference internal" href="../glossary.html#term-fit"><span class="xref std std-term">fit</span></a> and <a class="reference internal" href="../glossary.html#term-predict"><span class="xref std std-term">predict</span></a>. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10336">#10336</a> by <a class="reference external" href="https://github.com/haoranShu">Shu Haoran</a> and <a class="reference external" href="https://github.com/Andrew-peng">Andrew Peng</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <code class="xref py py-class docutils literal notranslate"><span class="pre">mixture.BaseMixture</span></code> where the reported <code class="docutils literal notranslate"><span class="pre">n_iter_</span></code> was
missing an iteration. It affected <a class="reference internal" href="../modules/generated/sklearn.mixture.GaussianMixture.html#sklearn.mixture.GaussianMixture" title="sklearn.mixture.GaussianMixture"><code class="xref py py-class docutils literal notranslate"><span class="pre">mixture.GaussianMixture</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.mixture.BayesianGaussianMixture.html#sklearn.mixture.BayesianGaussianMixture" title="sklearn.mixture.BayesianGaussianMixture"><code class="xref py py-class docutils literal notranslate"><span class="pre">mixture.BayesianGaussianMixture</span></code></a>. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10740">#10740</a> by <a class="reference external" href="https://github.com/kno10">Erich
Schubert</a> and <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <code class="xref py py-class docutils literal notranslate"><span class="pre">mixture.BaseMixture</span></code> and its subclasses
<a class="reference internal" href="../modules/generated/sklearn.mixture.GaussianMixture.html#sklearn.mixture.GaussianMixture" title="sklearn.mixture.GaussianMixture"><code class="xref py py-class docutils literal notranslate"><span class="pre">mixture.GaussianMixture</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.mixture.BayesianGaussianMixture.html#sklearn.mixture.BayesianGaussianMixture" title="sklearn.mixture.BayesianGaussianMixture"><code class="xref py py-class docutils literal notranslate"><span class="pre">mixture.BayesianGaussianMixture</span></code></a>
where the <code class="docutils literal notranslate"><span class="pre">lower_bound_</span></code> was not the max lower bound across all
initializations (when <code class="docutils literal notranslate"><span class="pre">n_init</span> <span class="pre">&gt;</span> <span class="pre">1</span></code>), but just the lower bound of the last
initialization. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10869">#10869</a> by <a class="reference external" href="https://github.com/ageron">Aurélien Géron</a>.</p></li>
</ul>
</div>
<div class="section" id="id35">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.model_selection" title="sklearn.model_selection"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.model_selection</span></code></a><a class="headerlink" href="#id35" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  Add <code class="docutils literal notranslate"><span class="pre">return_estimator</span></code> parameter in
<a class="reference internal" href="../modules/generated/sklearn.model_selection.cross_validate.html#sklearn.model_selection.cross_validate" title="sklearn.model_selection.cross_validate"><code class="xref py py-func docutils literal notranslate"><span class="pre">model_selection.cross_validate</span></code></a> to return estimators fitted on each
split. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9686">#9686</a> by <a class="reference external" href="https://github.com/bellet">Aurélien Bellet</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  New <code class="docutils literal notranslate"><span class="pre">refit_time_</span></code> attribute will be stored in
<a class="reference internal" href="../modules/generated/sklearn.model_selection.GridSearchCV.html#sklearn.model_selection.GridSearchCV" title="sklearn.model_selection.GridSearchCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.GridSearchCV</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.model_selection.RandomizedSearchCV.html#sklearn.model_selection.RandomizedSearchCV" title="sklearn.model_selection.RandomizedSearchCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.RandomizedSearchCV</span></code></a> if <code class="docutils literal notranslate"><span class="pre">refit</span></code> is set to <code class="docutils literal notranslate"><span class="pre">True</span></code>.
This will allow measuring the complete time it takes to perform
hyperparameter optimization and refitting the best model on the whole
dataset. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11310">#11310</a> by <a class="reference external" href="https://github.com/mfeurer">Matthias Feurer</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  Expose <code class="docutils literal notranslate"><span class="pre">error_score</span></code> parameter in
<a class="reference internal" href="../modules/generated/sklearn.model_selection.cross_validate.html#sklearn.model_selection.cross_validate" title="sklearn.model_selection.cross_validate"><code class="xref py py-func docutils literal notranslate"><span class="pre">model_selection.cross_validate</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.model_selection.cross_val_score.html#sklearn.model_selection.cross_val_score" title="sklearn.model_selection.cross_val_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">model_selection.cross_val_score</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.model_selection.learning_curve.html#sklearn.model_selection.learning_curve" title="sklearn.model_selection.learning_curve"><code class="xref py py-func docutils literal notranslate"><span class="pre">model_selection.learning_curve</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.model_selection.validation_curve.html#sklearn.model_selection.validation_curve" title="sklearn.model_selection.validation_curve"><code class="xref py py-func docutils literal notranslate"><span class="pre">model_selection.validation_curve</span></code></a> to control the behavior triggered
when an error occurs in <code class="xref py py-func docutils literal notranslate"><span class="pre">model_selection._fit_and_score</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11576">#11576</a> by <a class="reference external" href="https://github.com/samronsin">Samuel O. Ronsin</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  <code class="docutils literal notranslate"><span class="pre">BaseSearchCV</span></code> now has an experimental, private interface to
support customized parameter search strategies, through its <code class="docutils literal notranslate"><span class="pre">_run_search</span></code>
method. See the implementations in <a class="reference internal" href="../modules/generated/sklearn.model_selection.GridSearchCV.html#sklearn.model_selection.GridSearchCV" title="sklearn.model_selection.GridSearchCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.GridSearchCV</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.model_selection.RandomizedSearchCV.html#sklearn.model_selection.RandomizedSearchCV" title="sklearn.model_selection.RandomizedSearchCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.RandomizedSearchCV</span></code></a> and please provide feedback if
you use this. Note that we do not assure the stability of this API beyond
version 0.20. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9599">#9599</a> by <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a></p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span>  Add improved error message in
<a class="reference internal" href="../modules/generated/sklearn.model_selection.cross_val_score.html#sklearn.model_selection.cross_val_score" title="sklearn.model_selection.cross_val_score"><code class="xref py py-func docutils literal notranslate"><span class="pre">model_selection.cross_val_score</span></code></a> when multiple metrics are passed in
<code class="docutils literal notranslate"><span class="pre">scoring</span></code> keyword. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11006">#11006</a> by <a class="reference external" href="https://github.com/minggli">Ming Li</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  The default number of cross-validation folds <code class="docutils literal notranslate"><span class="pre">cv</span></code> and the default
number of splits <code class="docutils literal notranslate"><span class="pre">n_splits</span></code> in the <a class="reference internal" href="../modules/generated/sklearn.model_selection.KFold.html#sklearn.model_selection.KFold" title="sklearn.model_selection.KFold"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.KFold</span></code></a>-like
splitters will change from 3 to 5 in 0.22 as 3-fold has a lot of variance.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11557">#11557</a> by <a class="reference external" href="https://github.com/aboucaud">Alexandre Boucaud</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  The default of <code class="docutils literal notranslate"><span class="pre">iid</span></code> parameter of <a class="reference internal" href="../modules/generated/sklearn.model_selection.GridSearchCV.html#sklearn.model_selection.GridSearchCV" title="sklearn.model_selection.GridSearchCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.GridSearchCV</span></code></a>
and <a class="reference internal" href="../modules/generated/sklearn.model_selection.RandomizedSearchCV.html#sklearn.model_selection.RandomizedSearchCV" title="sklearn.model_selection.RandomizedSearchCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.RandomizedSearchCV</span></code></a> will change from <code class="docutils literal notranslate"><span class="pre">True</span></code> to
<code class="docutils literal notranslate"><span class="pre">False</span></code> in version 0.22 to correspond to the standard definition of
cross-validation, and the parameter will be removed in version 0.24
altogether. This parameter is of greatest practical significance where the
sizes of different test sets in cross-validation were very unequal, i.e. in
group-based CV strategies. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9085">#9085</a> by <a class="reference external" href="https://github.com/ldirer">Laurent Direr</a>
and <a class="reference external" href="https://amueller.github.io/">Andreas Müller</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  The default value of the <code class="docutils literal notranslate"><span class="pre">error_score</span></code> parameter in
<a class="reference internal" href="../modules/generated/sklearn.model_selection.GridSearchCV.html#sklearn.model_selection.GridSearchCV" title="sklearn.model_selection.GridSearchCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.GridSearchCV</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.model_selection.RandomizedSearchCV.html#sklearn.model_selection.RandomizedSearchCV" title="sklearn.model_selection.RandomizedSearchCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.RandomizedSearchCV</span></code></a> will change to <code class="docutils literal notranslate"><span class="pre">np.NaN</span></code> in
version 0.22. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10677">#10677</a> by <a class="reference external" href="https://github.com/Zhdanovich">Kirill Zhdanovich</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  Changed ValueError exception raised in
<a class="reference internal" href="../modules/generated/sklearn.model_selection.ParameterSampler.html#sklearn.model_selection.ParameterSampler" title="sklearn.model_selection.ParameterSampler"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.ParameterSampler</span></code></a> to a UserWarning for case where the
class is instantiated with a greater value of <code class="docutils literal notranslate"><span class="pre">n_iter</span></code> than the total space
of parameters in the parameter grid. <code class="docutils literal notranslate"><span class="pre">n_iter</span></code> now acts as an upper bound on
iterations. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10982">#10982</a> by <a class="reference external" href="https://github.com/julietcl">Juliet Lawton</a></p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  Invalid input for <a class="reference internal" href="../modules/generated/sklearn.model_selection.ParameterGrid.html#sklearn.model_selection.ParameterGrid" title="sklearn.model_selection.ParameterGrid"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.ParameterGrid</span></code></a> now
raises TypeError.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10928">#10928</a> by <a class="reference external" href="https://github.com/solutusimmensus">Solutus Immensus</a></p></li>
</ul>
</div>
<div class="section" id="sklearn-multioutput">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.multioutput" title="sklearn.multioutput"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.multioutput</span></code></a><a class="headerlink" href="#sklearn-multioutput" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Major Feature</span></span>  Added <a class="reference internal" href="../modules/generated/sklearn.multioutput.RegressorChain.html#sklearn.multioutput.RegressorChain" title="sklearn.multioutput.RegressorChain"><code class="xref py py-class docutils literal notranslate"><span class="pre">multioutput.RegressorChain</span></code></a> for multi-target
regression. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9257">#9257</a> by <a class="reference external" href="https://github.com/thechargedneutron">Kumar Ashutosh</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-naive-bayes">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.naive_bayes" title="sklearn.naive_bayes"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.naive_bayes</span></code></a><a class="headerlink" href="#sklearn-naive-bayes" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Major Feature</span></span>  Added <a class="reference internal" href="../modules/generated/sklearn.naive_bayes.ComplementNB.html#sklearn.naive_bayes.ComplementNB" title="sklearn.naive_bayes.ComplementNB"><code class="xref py py-class docutils literal notranslate"><span class="pre">naive_bayes.ComplementNB</span></code></a>, which implements the
Complement Naive Bayes classifier described in Rennie et al. (2003).
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/8190">#8190</a> by <a class="reference external" href="https://github.com/airalcorn2">Michael A. Alcorn</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  Add <code class="docutils literal notranslate"><span class="pre">var_smoothing</span></code> parameter in <a class="reference internal" href="../modules/generated/sklearn.naive_bayes.GaussianNB.html#sklearn.naive_bayes.GaussianNB" title="sklearn.naive_bayes.GaussianNB"><code class="xref py py-class docutils literal notranslate"><span class="pre">naive_bayes.GaussianNB</span></code></a>
to give a precise control over variances calculation.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9681">#9681</a> by <a class="reference external" href="https://github.com/Mottl">Dmitry Mottl</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.naive_bayes.GaussianNB.html#sklearn.naive_bayes.GaussianNB" title="sklearn.naive_bayes.GaussianNB"><code class="xref py py-class docutils literal notranslate"><span class="pre">naive_bayes.GaussianNB</span></code></a> which incorrectly
raised error for prior list which summed to 1.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10005">#10005</a> by <a class="reference external" href="https://github.com/gxyd">Gaurav Dhingra</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.naive_bayes.MultinomialNB.html#sklearn.naive_bayes.MultinomialNB" title="sklearn.naive_bayes.MultinomialNB"><code class="xref py py-class docutils literal notranslate"><span class="pre">naive_bayes.MultinomialNB</span></code></a> which did not accept
vector valued pseudocounts (alpha).
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10346">#10346</a> by <a class="reference external" href="https://github.com/TobiasMadsen">Tobias Madsen</a></p></li>
</ul>
</div>
<div class="section" id="id36">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.neighbors" title="sklearn.neighbors"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.neighbors</span></code></a><a class="headerlink" href="#id36" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-info">Efficiency</span></span>  <a class="reference internal" href="../modules/generated/sklearn.neighbors.RadiusNeighborsRegressor.html#sklearn.neighbors.RadiusNeighborsRegressor" title="sklearn.neighbors.RadiusNeighborsRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">neighbors.RadiusNeighborsRegressor</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.neighbors.RadiusNeighborsClassifier.html#sklearn.neighbors.RadiusNeighborsClassifier" title="sklearn.neighbors.RadiusNeighborsClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">neighbors.RadiusNeighborsClassifier</span></code></a> are now
parallelized according to <code class="docutils literal notranslate"><span class="pre">n_jobs</span></code> regardless of <code class="docutils literal notranslate"><span class="pre">algorithm</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10887">#10887</a> by <a class="reference external" href="https://github.com/recamshak">Joël Billaud</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Efficiency</span></span>  <code class="xref py py-mod docutils literal notranslate"><span class="pre">Nearest</span> <span class="pre">neighbors</span></code> query methods are now more
memory efficient when <code class="docutils literal notranslate"><span class="pre">algorithm='brute'</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11136">#11136</a> by <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a> and <a class="reference external" href="https://github.com/dalmia">Aman Dalmia</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  Add <code class="docutils literal notranslate"><span class="pre">sample_weight</span></code> parameter to the fit method of
<a class="reference internal" href="../modules/generated/sklearn.neighbors.KernelDensity.html#sklearn.neighbors.KernelDensity" title="sklearn.neighbors.KernelDensity"><code class="xref py py-class docutils literal notranslate"><span class="pre">neighbors.KernelDensity</span></code></a> to enable weighting in kernel density
estimation.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/4394">#4394</a> by <a class="reference external" href="https://github.com/samronsin">Samuel O. Ronsin</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  Novelty detection with <a class="reference internal" href="../modules/generated/sklearn.neighbors.LocalOutlierFactor.html#sklearn.neighbors.LocalOutlierFactor" title="sklearn.neighbors.LocalOutlierFactor"><code class="xref py py-class docutils literal notranslate"><span class="pre">neighbors.LocalOutlierFactor</span></code></a>:
Add a <code class="docutils literal notranslate"><span class="pre">novelty</span></code> parameter to <a class="reference internal" href="../modules/generated/sklearn.neighbors.LocalOutlierFactor.html#sklearn.neighbors.LocalOutlierFactor" title="sklearn.neighbors.LocalOutlierFactor"><code class="xref py py-class docutils literal notranslate"><span class="pre">neighbors.LocalOutlierFactor</span></code></a>. When
<code class="docutils literal notranslate"><span class="pre">novelty</span></code> is set to True, <a class="reference internal" href="../modules/generated/sklearn.neighbors.LocalOutlierFactor.html#sklearn.neighbors.LocalOutlierFactor" title="sklearn.neighbors.LocalOutlierFactor"><code class="xref py py-class docutils literal notranslate"><span class="pre">neighbors.LocalOutlierFactor</span></code></a> can then
be used for novelty detection, i.e. predict on new unseen data. Available
prediction methods are <code class="docutils literal notranslate"><span class="pre">predict</span></code>, <code class="docutils literal notranslate"><span class="pre">decision_function</span></code> and
<code class="docutils literal notranslate"><span class="pre">score_samples</span></code>. By default, <code class="docutils literal notranslate"><span class="pre">novelty</span></code> is set to <code class="docutils literal notranslate"><span class="pre">False</span></code>, and only
the <code class="docutils literal notranslate"><span class="pre">fit_predict</span></code> method is avaiable.
By <a class="reference external" href="https://github.com/albertcthomas">Albert Thomas</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.neighbors.NearestNeighbors.html#sklearn.neighbors.NearestNeighbors" title="sklearn.neighbors.NearestNeighbors"><code class="xref py py-class docutils literal notranslate"><span class="pre">neighbors.NearestNeighbors</span></code></a> where fitting a
NearestNeighbors model fails when a) the distance metric used is a
callable and b) the input to the NearestNeighbors model is sparse.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9579">#9579</a> by <a class="reference external" href="https://github.com/tttthomasssss">Thomas Kober</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug so <code class="docutils literal notranslate"><span class="pre">predict</span></code> in
<a class="reference internal" href="../modules/generated/sklearn.neighbors.RadiusNeighborsRegressor.html#sklearn.neighbors.RadiusNeighborsRegressor" title="sklearn.neighbors.RadiusNeighborsRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">neighbors.RadiusNeighborsRegressor</span></code></a> can handle empty neighbor set
when using non uniform weights. Also raises a new warning when no neighbors
are found for samples. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9655">#9655</a> by <a class="reference external" href="https://github.com/abjer">Andreas Bjerre-Nielsen</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  <span class="raw-html"><span class="badge badge-info">Efficiency</span></span>  Fixed a bug in <code class="docutils literal notranslate"><span class="pre">KDTree</span></code> construction that results in
faster construction and querying times.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11556">#11556</a> by <a class="reference external" href="https://github.com/jakevdp">Jake VanderPlas</a></p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.neighbors.KDTree.html#sklearn.neighbors.KDTree" title="sklearn.neighbors.KDTree"><code class="xref py py-class docutils literal notranslate"><span class="pre">neighbors.KDTree</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.neighbors.BallTree.html#sklearn.neighbors.BallTree" title="sklearn.neighbors.BallTree"><code class="xref py py-class docutils literal notranslate"><span class="pre">neighbors.BallTree</span></code></a> where
pickled tree objects would change their type to the super class <code class="xref py py-class docutils literal notranslate"><span class="pre">BinaryTree</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11774">#11774</a> by <a class="reference external" href="https://github.com/NicolasHug">Nicolas Hug</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-neural-network">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.neural_network" title="sklearn.neural_network"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.neural_network</span></code></a><a class="headerlink" href="#sklearn-neural-network" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  Add <code class="docutils literal notranslate"><span class="pre">n_iter_no_change</span></code> parameter in
<code class="xref py py-class docutils literal notranslate"><span class="pre">neural_network.BaseMultilayerPerceptron</span></code>,
<a class="reference internal" href="../modules/generated/sklearn.neural_network.MLPRegressor.html#sklearn.neural_network.MLPRegressor" title="sklearn.neural_network.MLPRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">neural_network.MLPRegressor</span></code></a>, and
<a class="reference internal" href="../modules/generated/sklearn.neural_network.MLPClassifier.html#sklearn.neural_network.MLPClassifier" title="sklearn.neural_network.MLPClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">neural_network.MLPClassifier</span></code></a> to give control over
maximum number of epochs to not meet <code class="docutils literal notranslate"><span class="pre">tol</span></code> improvement.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9456">#9456</a> by <a class="reference external" href="https://github.com/nnadeau">Nicholas Nadeau</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <code class="xref py py-class docutils literal notranslate"><span class="pre">neural_network.BaseMultilayerPerceptron</span></code>,
<a class="reference internal" href="../modules/generated/sklearn.neural_network.MLPRegressor.html#sklearn.neural_network.MLPRegressor" title="sklearn.neural_network.MLPRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">neural_network.MLPRegressor</span></code></a>, and
<a class="reference internal" href="../modules/generated/sklearn.neural_network.MLPClassifier.html#sklearn.neural_network.MLPClassifier" title="sklearn.neural_network.MLPClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">neural_network.MLPClassifier</span></code></a> with new <code class="docutils literal notranslate"><span class="pre">n_iter_no_change</span></code>
parameter now at 10 from previously hardcoded 2.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9456">#9456</a> by <a class="reference external" href="https://github.com/nnadeau">Nicholas Nadeau</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.neural_network.MLPRegressor.html#sklearn.neural_network.MLPRegressor" title="sklearn.neural_network.MLPRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">neural_network.MLPRegressor</span></code></a> where fitting
quit unexpectedly early due to local minima or fluctuations.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9456">#9456</a> by <a class="reference external" href="https://github.com/nnadeau">Nicholas Nadeau</a></p></li>
</ul>
</div>
<div class="section" id="sklearn-pipeline">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.pipeline" title="sklearn.pipeline"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.pipeline</span></code></a><a class="headerlink" href="#sklearn-pipeline" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  The <code class="docutils literal notranslate"><span class="pre">predict</span></code> method of <a class="reference internal" href="../modules/generated/sklearn.pipeline.Pipeline.html#sklearn.pipeline.Pipeline" title="sklearn.pipeline.Pipeline"><code class="xref py py-class docutils literal notranslate"><span class="pre">pipeline.Pipeline</span></code></a> now passes
keyword arguments on to the pipeline’s last estimator, enabling the use of
parameters such as <code class="docutils literal notranslate"><span class="pre">return_std</span></code> in a pipeline with caution.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9304">#9304</a> by <a class="reference external" href="https://github.com/brenolf">Breno Freitas</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  <a class="reference internal" href="../modules/generated/sklearn.pipeline.FeatureUnion.html#sklearn.pipeline.FeatureUnion" title="sklearn.pipeline.FeatureUnion"><code class="xref py py-class docutils literal notranslate"><span class="pre">pipeline.FeatureUnion</span></code></a> now supports <code class="docutils literal notranslate"><span class="pre">'drop'</span></code> as a transformer
to drop features. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11144">#11144</a> by <a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p></li>
</ul>
</div>
<div class="section" id="id37">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.preprocessing" title="sklearn.preprocessing"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.preprocessing</span></code></a><a class="headerlink" href="#id37" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Major Feature</span></span>  Expanded <a class="reference internal" href="../modules/generated/sklearn.preprocessing.OneHotEncoder.html#sklearn.preprocessing.OneHotEncoder" title="sklearn.preprocessing.OneHotEncoder"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.OneHotEncoder</span></code></a> to allow to
encode categorical string features as a numeric array using a one-hot (or
dummy) encoding scheme, and added <a class="reference internal" href="../modules/generated/sklearn.preprocessing.OrdinalEncoder.html#sklearn.preprocessing.OrdinalEncoder" title="sklearn.preprocessing.OrdinalEncoder"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.OrdinalEncoder</span></code></a> to
convert to ordinal integers. Those two classes now handle encoding of all
feature types (also handles string-valued features) and derives the
categories based on the unique values in the features instead of the maximum
value in the features. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9151">#9151</a> and <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10521">#10521</a> by <a class="reference external" href="https://github.com/vighneshbirodkar">Vighnesh
Birodkar</a> and <a class="reference external" href="https://github.com/jorisvandenbossche">Joris Van den Bossche</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Major Feature</span></span>  Added <a class="reference internal" href="../modules/generated/sklearn.preprocessing.KBinsDiscretizer.html#sklearn.preprocessing.KBinsDiscretizer" title="sklearn.preprocessing.KBinsDiscretizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.KBinsDiscretizer</span></code></a> for turning
continuous features into categorical or one-hot encoded
features. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7668">#7668</a>, <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9647">#9647</a>, <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10195">#10195</a>,
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10192">#10192</a>, <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11272">#11272</a>, <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11467">#11467</a> and <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11505">#11505</a>.
by <a class="reference external" href="https://github.com/hlin117">Henry Lin</a>, <a class="reference external" href="https://github.com/qinhanmin2014">Hanmin Qin</a>,
<a class="reference external" href="https://github.com/TomDLT">Tom Dupre la Tour</a> and <a class="reference external" href="https://github.com/ggc87">Giovanni Giuseppe Costa</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Major Feature</span></span>  Added <a class="reference internal" href="../modules/generated/sklearn.preprocessing.PowerTransformer.html#sklearn.preprocessing.PowerTransformer" title="sklearn.preprocessing.PowerTransformer"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.PowerTransformer</span></code></a>, which
implements the Yeo-Johnson and Box-Cox power transformations. Power
transformations try to find a set of feature-wise parametric transformations
to approximately map data to a Gaussian distribution centered at zero and
with unit variance. This is useful as a variance-stabilizing transformation
in situations where normality and homoscedasticity are desirable.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10210">#10210</a> by <a class="reference external" href="https://github.com/chang">Eric Chang</a> and <a class="reference external" href="https://github.com/maniteja123">Maniteja
Nandana</a>, and <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11520">#11520</a> by <a class="reference external" href="https://github.com/nicolashug">Nicolas Hug</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Major Feature</span></span>  NaN values are ignored and handled in the following
preprocessing methods:
<a class="reference internal" href="../modules/generated/sklearn.preprocessing.MaxAbsScaler.html#sklearn.preprocessing.MaxAbsScaler" title="sklearn.preprocessing.MaxAbsScaler"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.MaxAbsScaler</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.preprocessing.MinMaxScaler.html#sklearn.preprocessing.MinMaxScaler" title="sklearn.preprocessing.MinMaxScaler"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.MinMaxScaler</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.preprocessing.RobustScaler.html#sklearn.preprocessing.RobustScaler" title="sklearn.preprocessing.RobustScaler"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.RobustScaler</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.preprocessing.StandardScaler.html#sklearn.preprocessing.StandardScaler" title="sklearn.preprocessing.StandardScaler"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.StandardScaler</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.preprocessing.PowerTransformer.html#sklearn.preprocessing.PowerTransformer" title="sklearn.preprocessing.PowerTransformer"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.PowerTransformer</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.preprocessing.QuantileTransformer.html#sklearn.preprocessing.QuantileTransformer" title="sklearn.preprocessing.QuantileTransformer"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.QuantileTransformer</span></code></a> classes and
<a class="reference internal" href="../modules/generated/sklearn.preprocessing.maxabs_scale.html#sklearn.preprocessing.maxabs_scale" title="sklearn.preprocessing.maxabs_scale"><code class="xref py py-func docutils literal notranslate"><span class="pre">preprocessing.maxabs_scale</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.preprocessing.minmax_scale.html#sklearn.preprocessing.minmax_scale" title="sklearn.preprocessing.minmax_scale"><code class="xref py py-func docutils literal notranslate"><span class="pre">preprocessing.minmax_scale</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.preprocessing.robust_scale.html#sklearn.preprocessing.robust_scale" title="sklearn.preprocessing.robust_scale"><code class="xref py py-func docutils literal notranslate"><span class="pre">preprocessing.robust_scale</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.preprocessing.scale.html#sklearn.preprocessing.scale" title="sklearn.preprocessing.scale"><code class="xref py py-func docutils literal notranslate"><span class="pre">preprocessing.scale</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.preprocessing.power_transform.html#sklearn.preprocessing.power_transform" title="sklearn.preprocessing.power_transform"><code class="xref py py-func docutils literal notranslate"><span class="pre">preprocessing.power_transform</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.preprocessing.quantile_transform.html#sklearn.preprocessing.quantile_transform" title="sklearn.preprocessing.quantile_transform"><code class="xref py py-func docutils literal notranslate"><span class="pre">preprocessing.quantile_transform</span></code></a> functions respectively addressed in
issues <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11011">#11011</a>, <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11005">#11005</a>, <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11308">#11308</a>, <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11206">#11206</a>,
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11306">#11306</a>, and <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10437">#10437</a>.
By <a class="reference external" href="https://github.com/LucijaGregov">Lucija Gregov</a> and
<a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  <a class="reference internal" href="../modules/generated/sklearn.preprocessing.PolynomialFeatures.html#sklearn.preprocessing.PolynomialFeatures" title="sklearn.preprocessing.PolynomialFeatures"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.PolynomialFeatures</span></code></a> now supports sparse
input. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10452">#10452</a> by <a class="reference external" href="https://github.com/dalmia">Aman Dalmia</a> and <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  <a class="reference internal" href="../modules/generated/sklearn.preprocessing.RobustScaler.html#sklearn.preprocessing.RobustScaler" title="sklearn.preprocessing.RobustScaler"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.RobustScaler</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.preprocessing.robust_scale.html#sklearn.preprocessing.robust_scale" title="sklearn.preprocessing.robust_scale"><code class="xref py py-func docutils literal notranslate"><span class="pre">preprocessing.robust_scale</span></code></a> can be fitted using sparse matrices.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11308">#11308</a> by <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  <a class="reference internal" href="../modules/generated/sklearn.preprocessing.OneHotEncoder.html#sklearn.preprocessing.OneHotEncoder" title="sklearn.preprocessing.OneHotEncoder"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.OneHotEncoder</span></code></a> now supports the
<a class="reference internal" href="../glossary.html#term-get-feature-names"><span class="xref std std-term">get_feature_names</span></a> method to obtain the transformed feature names.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10181">#10181</a> by <a class="reference external" href="https://github.com/Nirvan101">Nirvan Anjirbag</a> and
<a class="reference external" href="https://github.com/jorisvandenbossche">Joris Van den Bossche</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  A parameter <code class="docutils literal notranslate"><span class="pre">check_inverse</span></code> was added to
<a class="reference internal" href="../modules/generated/sklearn.preprocessing.FunctionTransformer.html#sklearn.preprocessing.FunctionTransformer" title="sklearn.preprocessing.FunctionTransformer"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.FunctionTransformer</span></code></a> to ensure that <code class="docutils literal notranslate"><span class="pre">func</span></code> and
<code class="docutils literal notranslate"><span class="pre">inverse_func</span></code> are the inverse of each other.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9399">#9399</a> by <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  The <code class="docutils literal notranslate"><span class="pre">transform</span></code> method of <a class="reference internal" href="../modules/generated/sklearn.preprocessing.MultiLabelBinarizer.html#sklearn.preprocessing.MultiLabelBinarizer" title="sklearn.preprocessing.MultiLabelBinarizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.preprocessing.MultiLabelBinarizer</span></code></a>
now ignores any unknown classes. A warning is raised stating the unknown classes
classes found which are ignored.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10913">#10913</a> by <a class="reference external" href="https://github.com/rragundez">Rodrigo Agundez</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed bugs in <a class="reference internal" href="../modules/generated/sklearn.preprocessing.LabelEncoder.html#sklearn.preprocessing.LabelEncoder" title="sklearn.preprocessing.LabelEncoder"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.LabelEncoder</span></code></a> which would
sometimes throw errors when <code class="docutils literal notranslate"><span class="pre">transform</span></code> or <code class="docutils literal notranslate"><span class="pre">inverse_transform</span></code> was called
with empty arrays. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10458">#10458</a> by <a class="reference external" href="https://github.com/maykulkarni">Mayur Kulkarni</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fix ValueError in <a class="reference internal" href="../modules/generated/sklearn.preprocessing.LabelEncoder.html#sklearn.preprocessing.LabelEncoder" title="sklearn.preprocessing.LabelEncoder"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.LabelEncoder</span></code></a> when using
<code class="docutils literal notranslate"><span class="pre">inverse_transform</span></code> on unseen labels. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9816">#9816</a> by <a class="reference external" href="https://github.com/newey01c">Charlie Newey</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fix bug in <a class="reference internal" href="../modules/generated/sklearn.preprocessing.OneHotEncoder.html#sklearn.preprocessing.OneHotEncoder" title="sklearn.preprocessing.OneHotEncoder"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.OneHotEncoder</span></code></a> which discarded the
<code class="docutils literal notranslate"><span class="pre">dtype</span></code> when returning a sparse matrix output.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11042">#11042</a> by <a class="reference external" href="https://github.com/DanielMorales9">Daniel Morales</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fix <code class="docutils literal notranslate"><span class="pre">fit</span></code> and <code class="docutils literal notranslate"><span class="pre">partial_fit</span></code> in
<a class="reference internal" href="../modules/generated/sklearn.preprocessing.StandardScaler.html#sklearn.preprocessing.StandardScaler" title="sklearn.preprocessing.StandardScaler"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.StandardScaler</span></code></a> in the rare case when <code class="docutils literal notranslate"><span class="pre">with_mean=False</span></code>
and <code class="docutils literal notranslate"><span class="pre">with_std=False</span></code> which was crashing by calling <code class="docutils literal notranslate"><span class="pre">fit</span></code> more than once and
giving inconsistent results for <code class="docutils literal notranslate"><span class="pre">mean_</span></code> whether the input was a sparse or a
dense matrix. <code class="docutils literal notranslate"><span class="pre">mean_</span></code> will be set to <code class="docutils literal notranslate"><span class="pre">None</span></code> with both sparse and dense
inputs. <code class="docutils literal notranslate"><span class="pre">n_samples_seen_</span></code> will be also reported for both input types.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11235">#11235</a> by <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  Deprecate <code class="docutils literal notranslate"><span class="pre">n_values</span></code> and <code class="docutils literal notranslate"><span class="pre">categorical_features</span></code> parameters and
<code class="docutils literal notranslate"><span class="pre">active_features_</span></code>, <code class="docutils literal notranslate"><span class="pre">feature_indices_</span></code> and <code class="docutils literal notranslate"><span class="pre">n_values_</span></code> attributes
of <a class="reference internal" href="../modules/generated/sklearn.preprocessing.OneHotEncoder.html#sklearn.preprocessing.OneHotEncoder" title="sklearn.preprocessing.OneHotEncoder"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.OneHotEncoder</span></code></a>. The <code class="docutils literal notranslate"><span class="pre">n_values</span></code> parameter can be
replaced with the new <code class="docutils literal notranslate"><span class="pre">categories</span></code> parameter, and the attributes with the
new <code class="docutils literal notranslate"><span class="pre">categories_</span></code> attribute. Selecting the categorical features with
the <code class="docutils literal notranslate"><span class="pre">categorical_features</span></code> parameter is now better supported using the
<a class="reference internal" href="../modules/generated/sklearn.compose.ColumnTransformer.html#sklearn.compose.ColumnTransformer" title="sklearn.compose.ColumnTransformer"><code class="xref py py-class docutils literal notranslate"><span class="pre">compose.ColumnTransformer</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10521">#10521</a> by <a class="reference external" href="https://github.com/jorisvandenbossche">Joris Van den Bossche</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  Deprecate <code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.Imputer</span></code> and move
the corresponding module to <a class="reference internal" href="../modules/generated/sklearn.impute.SimpleImputer.html#sklearn.impute.SimpleImputer" title="sklearn.impute.SimpleImputer"><code class="xref py py-class docutils literal notranslate"><span class="pre">impute.SimpleImputer</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9726">#9726</a> by <a class="reference external" href="https://github.com/thechargedneutron">Kumar Ashutosh</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  The <code class="docutils literal notranslate"><span class="pre">axis</span></code> parameter that was in
<code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.Imputer</span></code> is no longer present in
<a class="reference internal" href="../modules/generated/sklearn.impute.SimpleImputer.html#sklearn.impute.SimpleImputer" title="sklearn.impute.SimpleImputer"><code class="xref py py-class docutils literal notranslate"><span class="pre">impute.SimpleImputer</span></code></a>. The behavior is equivalent
to <code class="docutils literal notranslate"><span class="pre">axis=0</span></code> (impute along columns). Row-wise
imputation can be performed with FunctionTransformer
(e.g., <code class="docutils literal notranslate"><span class="pre">FunctionTransformer(lambda</span> <span class="pre">X:</span>
<span class="pre">SimpleImputer().fit_transform(X.T).T)</span></code>). <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10829">#10829</a>
by <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a> and
<a class="reference external" href="https://github.com/gilbertoolimpio">Gilberto Olimpio</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  The NaN marker for the missing values has been changed
between the <code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.Imputer</span></code> and the
<a class="reference internal" href="../modules/generated/sklearn.impute.SimpleImputer.html#sklearn.impute.SimpleImputer" title="sklearn.impute.SimpleImputer"><code class="xref py py-class docutils literal notranslate"><span class="pre">impute.SimpleImputer</span></code></a>.
<code class="docutils literal notranslate"><span class="pre">missing_values='NaN'</span></code> should now be
<code class="docutils literal notranslate"><span class="pre">missing_values=np.nan</span></code>. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11211">#11211</a> by
<a class="reference external" href="https://github.com/jeremiedbb">Jeremie du Boisberranger</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  In <a class="reference internal" href="../modules/generated/sklearn.preprocessing.FunctionTransformer.html#sklearn.preprocessing.FunctionTransformer" title="sklearn.preprocessing.FunctionTransformer"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.FunctionTransformer</span></code></a>, the default of
<code class="docutils literal notranslate"><span class="pre">validate</span></code> will be from <code class="docutils literal notranslate"><span class="pre">True</span></code> to <code class="docutils literal notranslate"><span class="pre">False</span></code> in 0.22.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10655">#10655</a> by <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
</ul>
</div>
<div class="section" id="id38">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.svm" title="sklearn.svm"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.svm</span></code></a><a class="headerlink" href="#id38" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.svm.SVC.html#sklearn.svm.SVC" title="sklearn.svm.SVC"><code class="xref py py-class docutils literal notranslate"><span class="pre">svm.SVC</span></code></a> where when the argument <code class="docutils literal notranslate"><span class="pre">kernel</span></code> is
unicode in Python2, the <code class="docutils literal notranslate"><span class="pre">predict_proba</span></code> method was raising an
unexpected TypeError given dense inputs.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10412">#10412</a> by <a class="reference external" href="https://github.com/qmick">Jiongyan Zhang</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  Deprecate <code class="docutils literal notranslate"><span class="pre">random_state</span></code> parameter in <a class="reference internal" href="../modules/generated/sklearn.svm.OneClassSVM.html#sklearn.svm.OneClassSVM" title="sklearn.svm.OneClassSVM"><code class="xref py py-class docutils literal notranslate"><span class="pre">svm.OneClassSVM</span></code></a> as
the underlying implementation is not random.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9497">#9497</a> by <a class="reference external" href="https://github.com/albertcthomas">Albert Thomas</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  The default value of <code class="docutils literal notranslate"><span class="pre">gamma</span></code> parameter of <a class="reference internal" href="../modules/generated/sklearn.svm.SVC.html#sklearn.svm.SVC" title="sklearn.svm.SVC"><code class="xref py py-class docutils literal notranslate"><span class="pre">svm.SVC</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.svm.NuSVC.html#sklearn.svm.NuSVC" title="sklearn.svm.NuSVC"><code class="xref py py-class docutils literal notranslate"><span class="pre">NuSVC</span></code></a>, <a class="reference internal" href="../modules/generated/sklearn.svm.SVR.html#sklearn.svm.SVR" title="sklearn.svm.SVR"><code class="xref py py-class docutils literal notranslate"><span class="pre">SVR</span></code></a>, <a class="reference internal" href="../modules/generated/sklearn.svm.NuSVR.html#sklearn.svm.NuSVR" title="sklearn.svm.NuSVR"><code class="xref py py-class docutils literal notranslate"><span class="pre">NuSVR</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.svm.OneClassSVM.html#sklearn.svm.OneClassSVM" title="sklearn.svm.OneClassSVM"><code class="xref py py-class docutils literal notranslate"><span class="pre">OneClassSVM</span></code></a> will change from <code class="docutils literal notranslate"><span class="pre">'auto'</span></code> to <code class="docutils literal notranslate"><span class="pre">'scale'</span></code> in
version 0.22 to account better for unscaled features. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/8361">#8361</a> by
<a class="reference external" href="https://github.com/gxyd">Gaurav Dhingra</a> and <a class="reference external" href="https://github.com/neokt">Ting Neo</a>.</p></li>
</ul>
</div>
<div class="section" id="sklearn-tree">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.tree" title="sklearn.tree"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.tree</span></code></a><a class="headerlink" href="#sklearn-tree" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span>  Although private (and hence not assured API stability),
<code class="xref py py-class docutils literal notranslate"><span class="pre">tree._criterion.ClassificationCriterion</span></code> and
<code class="xref py py-class docutils literal notranslate"><span class="pre">tree._criterion.RegressionCriterion</span></code> may now be cimported and
extended. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10325">#10325</a> by <a class="reference external" href="https://github.com/camilstaps">Camil Staps</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <code class="xref py py-class docutils literal notranslate"><span class="pre">tree.BaseDecisionTree</span></code> with <code class="docutils literal notranslate"><span class="pre">splitter=&quot;best&quot;</span></code>
where split threshold could become infinite when values in X were
near infinite. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10536">#10536</a> by <a class="reference external" href="https://github.com/Johayon">Jonathan Ohayon</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in <code class="xref py py-class docutils literal notranslate"><span class="pre">tree.MAE</span></code> to ensure sample weights are being
used during the calculation of tree MAE impurity. Previous behaviour could
cause suboptimal splits to be chosen since the impurity calculation
considered all samples to be of equal weight importance.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11464">#11464</a> by <a class="reference external" href="https://github.com/JohnStott">John Stott</a>.</p></li>
</ul>
</div>
<div class="section" id="id39">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.utils" title="sklearn.utils"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.utils</span></code></a><a class="headerlink" href="#id39" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  <a class="reference internal" href="../modules/generated/sklearn.utils.check_array.html#sklearn.utils.check_array" title="sklearn.utils.check_array"><code class="xref py py-func docutils literal notranslate"><span class="pre">utils.check_array</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.utils.check_X_y.html#sklearn.utils.check_X_y" title="sklearn.utils.check_X_y"><code class="xref py py-func docutils literal notranslate"><span class="pre">utils.check_X_y</span></code></a> now have
<code class="docutils literal notranslate"><span class="pre">accept_large_sparse</span></code> to control whether scipy.sparse matrices with 64-bit
indices should be rejected.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11327">#11327</a> by <a class="reference external" href="https://github.com/kdhingra307">Karan Dhingra</a> and <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Efficiency</span></span>  <span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Avoid copying the data in <a class="reference internal" href="../modules/generated/sklearn.utils.check_array.html#sklearn.utils.check_array" title="sklearn.utils.check_array"><code class="xref py py-func docutils literal notranslate"><span class="pre">utils.check_array</span></code></a> when
the input data is a memmap (and <code class="docutils literal notranslate"><span class="pre">copy=False</span></code>). <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10663">#10663</a> by
<a class="reference external" href="https://github.com/arthurmensch">Arthur Mensch</a> and <a class="reference external" href="https://github.com/lesteve">Loïc Estève</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  <a class="reference internal" href="../modules/generated/sklearn.utils.check_array.html#sklearn.utils.check_array" title="sklearn.utils.check_array"><code class="xref py py-func docutils literal notranslate"><span class="pre">utils.check_array</span></code></a> yield a <code class="docutils literal notranslate"><span class="pre">FutureWarning</span></code> indicating
that arrays of bytes/strings will be interpreted as decimal numbers
beginning in version 0.22. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10229">#10229</a> by <a class="reference external" href="https://github.com/rtlee9">Ryan Lee</a></p></li>
</ul>
</div>
<div class="section" id="multiple-modules">
<h3>Multiple modules<a class="headerlink" href="#multiple-modules" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  <span class="raw-html"><span class="badge badge-warning">API Change</span></span>  More consistent outlier detection API:
Add a <code class="docutils literal notranslate"><span class="pre">score_samples</span></code> method in <a class="reference internal" href="../modules/generated/sklearn.svm.OneClassSVM.html#sklearn.svm.OneClassSVM" title="sklearn.svm.OneClassSVM"><code class="xref py py-class docutils literal notranslate"><span class="pre">svm.OneClassSVM</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.ensemble.IsolationForest.html#sklearn.ensemble.IsolationForest" title="sklearn.ensemble.IsolationForest"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.IsolationForest</span></code></a>, <a class="reference internal" href="../modules/generated/sklearn.neighbors.LocalOutlierFactor.html#sklearn.neighbors.LocalOutlierFactor" title="sklearn.neighbors.LocalOutlierFactor"><code class="xref py py-class docutils literal notranslate"><span class="pre">neighbors.LocalOutlierFactor</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.covariance.EllipticEnvelope.html#sklearn.covariance.EllipticEnvelope" title="sklearn.covariance.EllipticEnvelope"><code class="xref py py-class docutils literal notranslate"><span class="pre">covariance.EllipticEnvelope</span></code></a>. It allows to access raw score
functions from original papers. A new <code class="docutils literal notranslate"><span class="pre">offset_</span></code> parameter allows to link
<code class="docutils literal notranslate"><span class="pre">score_samples</span></code> and <code class="docutils literal notranslate"><span class="pre">decision_function</span></code> methods.
The <code class="docutils literal notranslate"><span class="pre">contamination</span></code> parameter of <a class="reference internal" href="../modules/generated/sklearn.ensemble.IsolationForest.html#sklearn.ensemble.IsolationForest" title="sklearn.ensemble.IsolationForest"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.IsolationForest</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.neighbors.LocalOutlierFactor.html#sklearn.neighbors.LocalOutlierFactor" title="sklearn.neighbors.LocalOutlierFactor"><code class="xref py py-class docutils literal notranslate"><span class="pre">neighbors.LocalOutlierFactor</span></code></a> <code class="docutils literal notranslate"><span class="pre">decision_function</span></code> methods is used
to define this <code class="docutils literal notranslate"><span class="pre">offset_</span></code> such that outliers (resp. inliers) have negative (resp.
positive) <code class="docutils literal notranslate"><span class="pre">decision_function</span></code> values. By default, <code class="docutils literal notranslate"><span class="pre">contamination</span></code> is
kept unchanged to 0.1 for a deprecation period. In 0.22, it will be set to “auto”,
thus using method-specific score offsets.
In <a class="reference internal" href="../modules/generated/sklearn.covariance.EllipticEnvelope.html#sklearn.covariance.EllipticEnvelope" title="sklearn.covariance.EllipticEnvelope"><code class="xref py py-class docutils literal notranslate"><span class="pre">covariance.EllipticEnvelope</span></code></a> <code class="docutils literal notranslate"><span class="pre">decision_function</span></code> method, the
<code class="docutils literal notranslate"><span class="pre">raw_values</span></code> parameter is deprecated as the shifted Mahalanobis distance
will be always returned in 0.22. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9015">#9015</a> by <a class="reference external" href="https://ngoix.github.io/">Nicolas Goix</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  <span class="raw-html"><span class="badge badge-warning">API Change</span></span>  A <code class="docutils literal notranslate"><span class="pre">behaviour</span></code> parameter has been introduced in <a class="reference internal" href="../modules/generated/sklearn.ensemble.IsolationForest.html#sklearn.ensemble.IsolationForest" title="sklearn.ensemble.IsolationForest"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.IsolationForest</span></code></a>
to ensure backward compatibility.
In the old behaviour, the <code class="docutils literal notranslate"><span class="pre">decision_function</span></code> is independent of the <code class="docutils literal notranslate"><span class="pre">contamination</span></code>
parameter. A threshold attribute depending on the <code class="docutils literal notranslate"><span class="pre">contamination</span></code> parameter is thus
used.
In the new behaviour the <code class="docutils literal notranslate"><span class="pre">decision_function</span></code> is dependent on the <code class="docutils literal notranslate"><span class="pre">contamination</span></code>
parameter, in such a way that 0 becomes its natural threshold to detect outliers.
Setting behaviour to “old” is deprecated and will not be possible in version 0.22.
Beside, the behaviour parameter will be removed in 0.24.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11553">#11553</a> by <a class="reference external" href="https://ngoix.github.io/">Nicolas Goix</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  Added convergence warning to <a class="reference internal" href="../modules/generated/sklearn.svm.LinearSVC.html#sklearn.svm.LinearSVC" title="sklearn.svm.LinearSVC"><code class="xref py py-class docutils literal notranslate"><span class="pre">svm.LinearSVC</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegression.html#sklearn.linear_model.LogisticRegression" title="sklearn.linear_model.LogisticRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LogisticRegression</span></code></a> when <code class="docutils literal notranslate"><span class="pre">verbose</span></code> is set to 0.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10881">#10881</a> by <a class="reference external" href="https://github.com/AlexandreSev">Alexandre Sevin</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  Changed warning type from <a class="reference external" href="https://docs.python.org/3/library/exceptions.html#UserWarning" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">UserWarning</span></code></a> to
<a class="reference internal" href="../modules/generated/sklearn.exceptions.ConvergenceWarning.html#sklearn.exceptions.ConvergenceWarning" title="sklearn.exceptions.ConvergenceWarning"><code class="xref py py-class docutils literal notranslate"><span class="pre">exceptions.ConvergenceWarning</span></code></a> for failing convergence in
<a class="reference internal" href="../modules/generated/sklearn.linear_model.logistic_regression_path.html#sklearn.linear_model.logistic_regression_path" title="sklearn.linear_model.logistic_regression_path"><code class="xref py py-func docutils literal notranslate"><span class="pre">linear_model.logistic_regression_path</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.linear_model.RANSACRegressor.html#sklearn.linear_model.RANSACRegressor" title="sklearn.linear_model.RANSACRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.RANSACRegressor</span></code></a>, <a class="reference internal" href="../modules/generated/sklearn.linear_model.ridge_regression.html#sklearn.linear_model.ridge_regression" title="sklearn.linear_model.ridge_regression"><code class="xref py py-func docutils literal notranslate"><span class="pre">linear_model.ridge_regression</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.gaussian_process.GaussianProcessRegressor.html#sklearn.gaussian_process.GaussianProcessRegressor" title="sklearn.gaussian_process.GaussianProcessRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">gaussian_process.GaussianProcessRegressor</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.gaussian_process.GaussianProcessClassifier.html#sklearn.gaussian_process.GaussianProcessClassifier" title="sklearn.gaussian_process.GaussianProcessClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">gaussian_process.GaussianProcessClassifier</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.decomposition.fastica.html#sklearn.decomposition.fastica" title="sklearn.decomposition.fastica"><code class="xref py py-func docutils literal notranslate"><span class="pre">decomposition.fastica</span></code></a>, <a class="reference internal" href="../modules/generated/sklearn.cross_decomposition.PLSCanonical.html#sklearn.cross_decomposition.PLSCanonical" title="sklearn.cross_decomposition.PLSCanonical"><code class="xref py py-class docutils literal notranslate"><span class="pre">cross_decomposition.PLSCanonical</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.cluster.AffinityPropagation.html#sklearn.cluster.AffinityPropagation" title="sklearn.cluster.AffinityPropagation"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.AffinityPropagation</span></code></a>, and <a class="reference internal" href="../modules/generated/sklearn.cluster.Birch.html#sklearn.cluster.Birch" title="sklearn.cluster.Birch"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.Birch</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10306">#10306</a> by <a class="reference external" href="https://github.com/jotasi">Jonathan Siebert</a>.</p></li>
</ul>
</div>
<div class="section" id="id40">
<h3>Miscellaneous<a class="headerlink" href="#id40" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Major Feature</span></span>  A new configuration parameter, <code class="docutils literal notranslate"><span class="pre">working_memory</span></code> was added
to control memory consumption limits in chunked operations, such as the new
<a class="reference internal" href="../modules/generated/sklearn.metrics.pairwise_distances_chunked.html#sklearn.metrics.pairwise_distances_chunked" title="sklearn.metrics.pairwise_distances_chunked"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.pairwise_distances_chunked</span></code></a>. See <a class="reference internal" href="../modules/computing.html#working-memory"><span class="std std-ref">Limiting Working Memory</span></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10280">#10280</a> by <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a> and <a class="reference external" href="https://github.com/dalmia">Aman Dalmia</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  The version of <a class="reference external" href="https://joblib.readthedocs.io/en/latest/index.html#module-joblib" title="(in joblib v0.14.1.dev0)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">joblib</span></code></a> bundled with Scikit-learn is now 0.12.
This uses a new default multiprocessing implementation, named <a class="reference external" href="https://github.com/tomMoral/loky">loky</a>. While this may incur some memory and
communication overhead, it should provide greater cross-platform stability
than relying on Python standard library multiprocessing. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11741">#11741</a> by
the Joblib developers, especially <a class="reference external" href="https://github.com/tomMoral">Thomas Moreau</a> and
<a class="reference external" href="https://twitter.com/ogrisel">Olivier Grisel</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  An environment variable to use the site joblib instead of the
vendored one was added (<a class="reference internal" href="../modules/computing.html#environment-variable"><span class="std std-ref">Environment variables</span></a>). The main API of joblib
is now exposed in <a class="reference internal" href="../modules/classes.html#module-sklearn.utils" title="sklearn.utils"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.utils</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11166">#11166</a> by <a class="reference external" href="http://gael-varoquaux.info">Gael Varoquaux</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  Add almost complete PyPy 3 support. Known unsupported
functionalities are <a class="reference internal" href="../modules/generated/sklearn.datasets.load_svmlight_file.html#sklearn.datasets.load_svmlight_file" title="sklearn.datasets.load_svmlight_file"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.load_svmlight_file</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.feature_extraction.FeatureHasher.html#sklearn.feature_extraction.FeatureHasher" title="sklearn.feature_extraction.FeatureHasher"><code class="xref py py-class docutils literal notranslate"><span class="pre">feature_extraction.FeatureHasher</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.feature_extraction.text.HashingVectorizer.html#sklearn.feature_extraction.text.HashingVectorizer" title="sklearn.feature_extraction.text.HashingVectorizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">feature_extraction.text.HashingVectorizer</span></code></a>. For running on PyPy,
PyPy3-v5.10+, Numpy 1.14.0+, and scipy 1.1.0+ are required.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11010">#11010</a> by <a class="reference external" href="https://github.com/rlamy">Ronan Lamy</a> and <a class="reference external" href="https://github.com/rth">Roman Yurchak</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span>  A utility method <a class="reference internal" href="../modules/generated/sklearn.show_versions.html#sklearn.show_versions" title="sklearn.show_versions"><code class="xref py py-func docutils literal notranslate"><span class="pre">sklearn.show_versions</span></code></a> was added to
print out information relevant for debugging. It includes the user system,
the Python executable, the version of the main libraries and BLAS binding
information. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11596">#11596</a> by <a class="reference external" href="https://github.com/aboucaud">Alexandre Boucaud</a></p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug when setting parameters on meta-estimator, involving both
a wrapped estimator and its parameter. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9999">#9999</a> by <a class="reference external" href="https://github.com/marcus-voss">Marcus Voss</a> and <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug where calling <a class="reference internal" href="../modules/generated/sklearn.base.clone.html#sklearn.base.clone" title="sklearn.base.clone"><code class="xref py py-func docutils literal notranslate"><span class="pre">sklearn.base.clone</span></code></a> was not thread
safe and could result in a “pop from empty list” error. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9569">#9569</a>
by <a class="reference external" href="https://amueller.github.io/">Andreas Müller</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span>  The default value of <code class="docutils literal notranslate"><span class="pre">n_jobs</span></code> is changed from <code class="docutils literal notranslate"><span class="pre">1</span></code> to <code class="docutils literal notranslate"><span class="pre">None</span></code> in
all related functions and classes. <code class="docutils literal notranslate"><span class="pre">n_jobs=None</span></code> means <code class="docutils literal notranslate"><span class="pre">unset</span></code>. It will
generally be interpreted as <code class="docutils literal notranslate"><span class="pre">n_jobs=1</span></code>, unless the current
<code class="docutils literal notranslate"><span class="pre">joblib.Parallel</span></code> backend context specifies otherwise (See
<a class="reference internal" href="../glossary.html#term-n-jobs"><span class="xref std std-term">Glossary</span></a> for additional information). Note that this change
happens immediately (i.e., without a deprecation cycle).
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11741">#11741</a> by <a class="reference external" href="https://twitter.com/ogrisel">Olivier Grisel</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span>  Fixed a bug in validation helpers where passing a Dask DataFrame results
in an error. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12462">#12462</a> by <a class="reference external" href="https://github.com/zwmiller">Zachariah Miller</a></p></li>
</ul>
</div>
</div>
<div class="section" id="changes-to-estimator-checks">
<h2>Changes to estimator checks<a class="headerlink" href="#changes-to-estimator-checks" title="Permalink to this headline">¶</a></h2>
<p>These changes mostly affect library developers.</p>
<ul class="simple">
<li><p>Checks for transformers now apply if the estimator implements
<a class="reference internal" href="../glossary.html#term-transform"><span class="xref std std-term">transform</span></a>, regardless of whether it inherits from
<a class="reference internal" href="../modules/generated/sklearn.base.TransformerMixin.html#sklearn.base.TransformerMixin" title="sklearn.base.TransformerMixin"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.base.TransformerMixin</span></code></a>. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10474">#10474</a> by <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a>.</p></li>
<li><p>Classifiers are now checked for consistency between <a class="reference internal" href="../glossary.html#term-decision-function"><span class="xref std std-term">decision_function</span></a>
and categorical predictions.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10500">#10500</a> by <a class="reference external" href="https://github.com/NarineK">Narine Kokhlikyan</a>.</p></li>
<li><p>Allow tests in <a class="reference internal" href="../modules/generated/sklearn.utils.estimator_checks.check_estimator.html#sklearn.utils.estimator_checks.check_estimator" title="sklearn.utils.estimator_checks.check_estimator"><code class="xref py py-func docutils literal notranslate"><span class="pre">utils.estimator_checks.check_estimator</span></code></a> to test functions
that accept pairwise data.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9701">#9701</a> by <a class="reference external" href="https://github.com/gkjohns">Kyle Johnson</a></p></li>
<li><p>Allow <a class="reference internal" href="../modules/generated/sklearn.utils.estimator_checks.check_estimator.html#sklearn.utils.estimator_checks.check_estimator" title="sklearn.utils.estimator_checks.check_estimator"><code class="xref py py-func docutils literal notranslate"><span class="pre">utils.estimator_checks.check_estimator</span></code></a> to check that there is no
private settings apart from parameters during estimator initialization.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9378">#9378</a> by <a class="reference external" href="https://github.com/herilalaina">Herilalaina Rakotoarison</a></p></li>
<li><p>The set of checks in <a class="reference internal" href="../modules/generated/sklearn.utils.estimator_checks.check_estimator.html#sklearn.utils.estimator_checks.check_estimator" title="sklearn.utils.estimator_checks.check_estimator"><code class="xref py py-func docutils literal notranslate"><span class="pre">utils.estimator_checks.check_estimator</span></code></a> now includes a
<code class="docutils literal notranslate"><span class="pre">check_set_params</span></code> test which checks that <code class="docutils literal notranslate"><span class="pre">set_params</span></code> is equivalent to
passing parameters in <code class="docutils literal notranslate"><span class="pre">__init__</span></code> and warns if it encounters parameter
validation. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/7738">#7738</a> by <a class="reference external" href="https://github.com/absolutelyNoWarranty">Alvin Chiang</a></p></li>
<li><p>Add invariance tests for clustering metrics. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/8102">#8102</a> by <a class="reference external" href="https://github.com/anki08">Ankita
Sinha</a> and <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
<li><p>Add <code class="docutils literal notranslate"><span class="pre">check_methods_subset_invariance</span></code> to
<a class="reference internal" href="../modules/generated/sklearn.utils.estimator_checks.check_estimator.html#sklearn.utils.estimator_checks.check_estimator" title="sklearn.utils.estimator_checks.check_estimator"><code class="xref py py-func docutils literal notranslate"><span class="pre">check_estimator</span></code></a>, which checks that
estimator methods are invariant if applied to a data subset.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10428">#10428</a> by <a class="reference external" href="https://github.com/Johayon">Jonathan Ohayon</a></p></li>
<li><p>Add tests in <a class="reference internal" href="../modules/generated/sklearn.utils.estimator_checks.check_estimator.html#sklearn.utils.estimator_checks.check_estimator" title="sklearn.utils.estimator_checks.check_estimator"><code class="xref py py-func docutils literal notranslate"><span class="pre">utils.estimator_checks.check_estimator</span></code></a> to check that an
estimator can handle read-only memmap input data. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10663">#10663</a> by
<a class="reference external" href="https://github.com/arthurmensch">Arthur Mensch</a> and <a class="reference external" href="https://github.com/lesteve">Loïc Estève</a>.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">check_sample_weights_pandas_series</span></code> now uses 8 rather than 6 samples
to accommodate for the default number of clusters in <a class="reference internal" href="../modules/generated/sklearn.cluster.KMeans.html#sklearn.cluster.KMeans" title="sklearn.cluster.KMeans"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.KMeans</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10933">#10933</a> by <a class="reference external" href="https://github.com/jnhansen">Johannes Hansen</a>.</p></li>
<li><p>Estimators are now checked for whether <code class="docutils literal notranslate"><span class="pre">sample_weight=None</span></code> equates to
<code class="docutils literal notranslate"><span class="pre">sample_weight=np.ones(...)</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/11558">#11558</a> by <a class="reference external" href="https://github.com/sergulaydore">Sergul Aydore</a>.</p></li>
</ul>
</div>
<div class="section" id="id41">
<h2>Code and Documentation Contributors<a class="headerlink" href="#id41" title="Permalink to this headline">¶</a></h2>
<p>Thanks to everyone who has contributed to the maintenance and improvement of the
project since version 0.19, including:</p>
<p>211217613, Aarshay Jain, absolutelyNoWarranty, Adam Greenhall, Adam Kleczewski,
Adam Richie-Halford, adelr, AdityaDaflapurkar, Adrin Jalali, Aidan Fitzgerald,
aishgrt1, Akash Shivram, Alan Liddell, Alan Yee, Albert Thomas, Alexander
Lenail, Alexander-N, Alexandre Boucaud, Alexandre Gramfort, Alexandre Sevin,
Alex Egg, Alvaro Perez-Diaz, Amanda, Aman Dalmia, Andreas Bjerre-Nielsen,
Andreas Mueller, Andrew Peng, Angus Williams, Aniruddha Dave, annaayzenshtat,
Anthony Gitter, Antonio Quinonez, Anubhav Marwaha, Arik Pamnani, Arthur Ozga,
Artiem K, Arunava, Arya McCarthy, Attractadore, Aurélien Bellet, Aurélien
Geron, Ayush Gupta, Balakumaran Manoharan, Bangda Sun, Barry Hart, Bastian
Venthur, Ben Lawson, Benn Roth, Breno Freitas, Brent Yi, brett koonce, Caio
Oliveira, Camil Staps, cclauss, Chady Kamar, Charlie Brummitt, Charlie Newey,
chris, Chris, Chris Catalfo, Chris Foster, Chris Holdgraf, Christian Braune,
Christian Hirsch, Christian Hogan, Christopher Jenness, Clement Joudet, cnx,
cwitte, Dallas Card, Dan Barkhorn, Daniel, Daniel Ferreira, Daniel Gomez,
Daniel Klevebring, Danielle Shwed, Daniel Mohns, Danil Baibak, Darius Morawiec,
David Beach, David Burns, David Kirkby, David Nicholson, David Pickup, Derek,
Didi Bar-Zev, diegodlh, Dillon Gardner, Dillon Niederhut, dilutedsauce,
dlovell, Dmitry Mottl, Dmitry Petrov, Dor Cohen, Douglas Duhaime, Ekaterina
Tuzova, Eric Chang, Eric Dean Sanchez, Erich Schubert, Eunji, Fang-Chieh Chou,
FarahSaeed, felix, Félix Raimundo, fenx, filipj8, FrankHui, Franz Wompner,
Freija Descamps, frsi, Gabriele Calvo, Gael Varoquaux, Gaurav Dhingra, Georgi
Peev, Gil Forsyth, Giovanni Giuseppe Costa, gkevinyen5418, goncalo-rodrigues,
Gryllos Prokopis, Guillaume Lemaitre, Guillaume “Vermeille” Sanchez, Gustavo De
Mari Pereira, hakaa1, Hanmin Qin, Henry Lin, Hong, Honghe, Hossein Pourbozorg,
Hristo, Hunan Rostomyan, iampat, Ivan PANICO, Jaewon Chung, Jake VanderPlas,
jakirkham, James Bourbeau, James Malcolm, Jamie Cox, Jan Koch, Jan Margeta, Jan
Schlüter, janvanrijn, Jason Wolosonovich, JC Liu, Jeb Bearer, jeremiedbb, Jimmy
Wan, Jinkun Wang, Jiongyan Zhang, jjabl, jkleint, Joan Massich, Joël Billaud,
Joel Nothman, Johannes Hansen, JohnStott, Jonatan Samoocha, Jonathan Ohayon,
Jörg Döpfert, Joris Van den Bossche, Jose Perez-Parras Toledano, josephsalmon,
jotasi, jschendel, Julian Kuhlmann, Julien Chaumond, julietcl, Justin Shenk,
Karl F, Kasper Primdal Lauritzen, Katrin Leinweber, Kirill, ksemb, Kuai Yu,
Kumar Ashutosh, Kyeongpil Kang, Kye Taylor, kyledrogo, Leland McInnes, Léo DS,
Liam Geron, Liutong Zhou, Lizao Li, lkjcalc, Loic Esteve, louib, Luciano Viola,
Lucija Gregov, Luis Osa, Luis Pedro Coelho, Luke M Craig, Luke Persola, Mabel,
Mabel Villalba, Maniteja Nandana, MarkIwanchyshyn, Mark Roth, Markus Müller,
MarsGuy, Martin Gubri, martin-hahn, martin-kokos, mathurinm, Matthias Feurer,
Max Copeland, Mayur Kulkarni, Meghann Agarwal, Melanie Goetz, Michael A.
Alcorn, Minghui Liu, Ming Li, Minh Le, Mohamed Ali Jamaoui, Mohamed Maskani,
Mohammad Shahebaz, Muayyad Alsadi, Nabarun Pal, Nagarjuna Kumar, Naoya Kanai,
Narendran Santhanam, NarineK, Nathaniel Saul, Nathan Suh, Nicholas Nadeau,
P.Eng.,  AVS, Nick Hoh, Nicolas Goix, Nicolas Hug, Nicolau Werneck,
nielsenmarkus11, Nihar Sheth, Nikita Titov, Nilesh Kevlani, Nirvan Anjirbag,
notmatthancock, nzw, Oleksandr Pavlyk, oliblum90, Oliver Rausch, Olivier
Grisel, Oren Milman, Osaid Rehman Nasir, pasbi, Patrick Fernandes, Patrick
Olden, Paul Paczuski, Pedro Morales, Peter, Peter St. John, pierreablin,
pietruh, Pinaki Nath Chowdhury, Piotr Szymański, Pradeep Reddy Raamana, Pravar
D Mahajan, pravarmahajan, QingYing Chen, Raghav RV, Rajendra arora,
RAKOTOARISON Herilalaina, Rameshwar Bhaskaran, RankyLau, Rasul Kerimov,
Reiichiro Nakano, Rob, Roman Kosobrodov, Roman Yurchak, Ronan Lamy, rragundez,
Rüdiger Busche, Ryan, Sachin Kelkar, Sagnik Bhattacharya, Sailesh Choyal, Sam
Radhakrishnan, Sam Steingold, Samuel Bell, Samuel O. Ronsin, Saqib Nizam
Shamsi, SATISH J, Saurabh Gupta, Scott Gigante, Sebastian Flennerhag, Sebastian
Raschka, Sebastien Dubois, Sébastien Lerique, Sebastin Santy, Sergey Feldman,
Sergey Melderis, Sergul Aydore, Shahebaz, Shalil Awaley, Shangwu Yao, Sharad
Vijalapuram, Sharan Yalburgi, shenhanc78, Shivam Rastogi, Shu Haoran, siftikha,
Sinclert Pérez, SolutusImmensus, Somya Anand, srajan paliwal, Sriharsha Hatwar,
Sri Krishna, Stefan van der Walt, Stephen McDowell, Steven Brown, syonekura,
Taehoon Lee, Takanori Hayashi, tarcusx, Taylor G Smith, theriley106, Thomas,
Thomas Fan, Thomas Heavey, Tobias Madsen, tobycheese, Tom Augspurger, Tom Dupré
la Tour, Tommy, Trevor Stephens, Trishnendu Ghorai, Tulio Casagrande,
twosigmajab, Umar Farouk Umar, Urvang Patel, Utkarsh Upadhyay, Vadim
Markovtsev, Varun Agrawal, Vathsala Achar, Vilhelm von Ehrenheim, Vinayak
Mehta, Vinit, Vinod Kumar L, Viraj Mavani, Viraj Navkal, Vivek Kumar, Vlad
Niculae, vqean3, Vrishank Bhardwaj, vufg, wallygauze, Warut Vijitbenjaronk,
wdevazelhes, Wenhao Zhang, Wes Barnett, Will, William de Vazelhes, Will
Rosenfeld, Xin Xiong, Yiming (Paul) Li, ymazari, Yufeng, Zach Griffith, Zé
Vinícius, Zhenqing Hu, Zhiqing Xiao, Zijie (ZJ) Poh</p>
</div>
</div>


      </div>
    <div class="container">
      <footer class="sk-content-footer">
            &copy; 2007 - 2019, scikit-learn developers (BSD License).
          <a href="../_sources/whats_new/v0.20.rst.txt" rel="nofollow">Show this page source</a>
      </footer>
    </div>
  </div>
</div>
<script src="../_static/js/vendor/bootstrap.min.js"></script>

<script>
    window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
    ga('create', 'UA-22606712-2', 'auto');
    ga('set', 'anonymizeIp', true);
    ga('send', 'pageview');
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>


<script>
$(document).ready(function() {
    /* Add a [>>>] button on the top-right corner of code samples to hide
     * the >>> and ... prompts and the output and thus make the code
     * copyable. */
    var div = $('.highlight-python .highlight,' +
                '.highlight-python3 .highlight,' +
                '.highlight-pycon .highlight,' +
		'.highlight-default .highlight')
    var pre = div.find('pre');

    // get the styles from the current theme
    pre.parent().parent().css('position', 'relative');
    var hide_text = 'Hide prompts and outputs';
    var show_text = 'Show prompts and outputs';

    // create and add the button to all the code blocks that contain >>>
    div.each(function(index) {
        var jthis = $(this);
        if (jthis.find('.gp').length > 0) {
            var button = $('<span class="copybutton">&gt;&gt;&gt;</span>');
            button.attr('title', hide_text);
            button.data('hidden', 'false');
            jthis.prepend(button);
        }
        // tracebacks (.gt) contain bare text elements that need to be
        // wrapped in a span to work with .nextUntil() (see later)
        jthis.find('pre:has(.gt)').contents().filter(function() {
            return ((this.nodeType == 3) && (this.data.trim().length > 0));
        }).wrap('<span>');
    });

    // define the behavior of the button when it's clicked
    $('.copybutton').click(function(e){
        e.preventDefault();
        var button = $(this);
        if (button.data('hidden') === 'false') {
            // hide the code output
            button.parent().find('.go, .gp, .gt').hide();
            button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'hidden');
            button.css('text-decoration', 'line-through');
            button.attr('title', show_text);
            button.data('hidden', 'true');
        } else {
            // show the code output
            button.parent().find('.go, .gp, .gt').show();
            button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'visible');
            button.css('text-decoration', 'none');
            button.attr('title', hide_text);
            button.data('hidden', 'false');
        }
    });

	/*** Add permalink buttons next to glossary terms ***/
	$('dl.glossary > dt[id]').append(function() {
		return ('<a class="headerlink" href="#' +
			    this.getAttribute('id') +
			    '" title="Permalink to this term">¶</a>');
	});
  /*** Hide navbar when scrolling down ***/
  // Returns true when headerlink target matches hash in url
  (function() {
    hashTargetOnTop = function() {
        var hash = window.location.hash;
        if ( hash.length < 2 ) { return false; }

        var target = document.getElementById( hash.slice(1) );
        if ( target === null ) { return false; }

        var top = target.getBoundingClientRect().top;
        return (top < 2) && (top > -2);
    };

    // Hide navbar on load if hash target is on top
    var navBar = document.getElementById("navbar");
    var navBarToggler = document.getElementById("sk-navbar-toggler");
    var navBarHeightHidden = "-" + navBar.getBoundingClientRect().height + "px";
    var $window = $(window);

    hideNavBar = function() {
        navBar.style.top = navBarHeightHidden;
    };

    showNavBar = function() {
        navBar.style.top = "0";
    }

    if (hashTargetOnTop()) {
        hideNavBar()
    }

    var prevScrollpos = window.pageYOffset;
    hideOnScroll = function(lastScrollTop) {
        if (($window.width() < 768) && (navBarToggler.getAttribute("aria-expanded") === 'true')) {
            return;
        }
        if (lastScrollTop > 2 && (prevScrollpos <= lastScrollTop) || hashTargetOnTop()){
            hideNavBar()
        } else {
            showNavBar()
        }
        prevScrollpos = lastScrollTop;
    };

    /*** high preformance scroll event listener***/
    var raf = window.requestAnimationFrame ||
        window.webkitRequestAnimationFrame ||
        window.mozRequestAnimationFrame ||
        window.msRequestAnimationFrame ||
        window.oRequestAnimationFrame;
    var lastScrollTop = $window.scrollTop();

    if (raf) {
        loop();
    }

    function loop() {
        var scrollTop = $window.scrollTop();
        if (lastScrollTop === scrollTop) {
            raf(loop);
            return;
        } else {
            lastScrollTop = scrollTop;
            hideOnScroll(lastScrollTop);
            raf(loop);
        }
    }
  })();
});

</script>
    
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
    
</body>
</html>